mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 10:35:11 -04:00
Blocks that cannot be placed/deleted should still be shown in the inventory, only invalid blocks should be hidden. (Thanks gemsgem)
This commit is contained in:
parent
37d055244d
commit
c057114de2
@ -197,7 +197,7 @@ namespace ClassicalSharp {
|
||||
void RecreateBlockTable() {
|
||||
int blocksCount = 0;
|
||||
for( int tile = 1; tile < BlockInfo.BlocksCount; tile++ ) {
|
||||
if( game.Inventory.CanPlace[tile] || game.Inventory.CanDelete[tile] )
|
||||
if( tile < BlockInfo.CpeBlocksCount || game.BlockInfo.Name[tile] != "Invalid" )
|
||||
blocksCount++;
|
||||
}
|
||||
|
||||
@ -208,7 +208,7 @@ namespace ClassicalSharp {
|
||||
|
||||
int tableIndex = 0;
|
||||
for( int tile = 1; tile < BlockInfo.BlocksCount; tile++ ) {
|
||||
if( game.Inventory.CanPlace[tile] || game.Inventory.CanDelete[tile] )
|
||||
if( tile < BlockInfo.CpeBlocksCount || game.BlockInfo.Name[tile] != "Invalid" )
|
||||
blocksTable[tableIndex++] = (Block)tile;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user