Skip to content

Commit

Permalink
Remove stuff, that doesn’t really do anything... ( Fixes #181 )
Browse files Browse the repository at this point in the history
  • Loading branch information
AlgorithmX2 committed Nov 24, 2016
1 parent a3dc684 commit cd7748d
Showing 1 changed file with 1 addition and 18 deletions.
Expand Up @@ -105,27 +105,10 @@ private static void updateCacheClient()
for ( final Iterator<Block> it = Block.REGISTRY.iterator(); it.hasNext(); )
{
final Block block = it.next();
final int blockId = Block.REGISTRY.getIDForObject( block );
int validMetas = 0;

for ( final IBlockState state : block.getBlockState().getValidStates() )
{
final int meta = block.getMetaFromState( state );
if ( meta == -1 )
{
continue;
}

validMetas |= 1 << meta;
}

while ( validMetas != 0 )
{
final int meta = Integer.numberOfTrailingZeros( validMetas );
validMetas &= ~( 1 << meta );

final int id = blockId | meta << 12;
final IBlockState state = Block.getStateById( id );
int id = Block.getStateId( state );
if ( state == null || state.getBlock() != block )
{
// reverse mapping is broken, so just skip over this state.
Expand Down

0 comments on commit cd7748d

Please sign in to comment.