fix strange issue when exiting and entering the same world

This commit is contained in:
Leijurv
2018-09-01 12:26:55 -07:00
parent aca487f97e
commit c0bc7b5ecd
2 changed files with 8 additions and 1 deletions

View File

@@ -31,7 +31,7 @@ import net.minecraft.world.chunk.Chunk;
public class BlockStateInterface implements Helper {
private static Chunk prev = null;
public static IBlockState get(BlockPos pos) { // wrappers for chunk caching capability
// Invalid vertical position
@@ -66,6 +66,10 @@ public class BlockStateInterface implements Helper {
return Blocks.AIR.getDefaultState();
}
public static void clearCachedChunk() {
prev = null;
}
public static Block getBlock(BlockPos pos) {
return get(pos).getBlock();
}