mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 09:35:23 -04:00
Client should switch to block on the hotbar if it is the same as the new held block rather than duplicating it, fixes #58.
This commit is contained in:
parent
6df70aa383
commit
e43add1d32
@ -73,6 +73,13 @@ namespace ClassicalSharp {
|
|||||||
AddChat( "&e/client: &cThe server has forbidden you from changing your held block." );
|
AddChat( "&e/client: &cThe server has forbidden you from changing your held block." );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
for( int i = 0; i < BlocksHotbar.Length; i++ ) {
|
||||||
|
if( BlocksHotbar[i] == value ) {
|
||||||
|
hotbarIndex = i;
|
||||||
|
RaiseHeldBlockChanged();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
BlocksHotbar[hotbarIndex] = value;
|
BlocksHotbar[hotbarIndex] = value;
|
||||||
RaiseHeldBlockChanged();
|
RaiseHeldBlockChanged();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user