Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/java/dev/tr7zw/entityculling/Provider.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
public class Provider implements DataProvider {

private final Minecraft client = Minecraft.getMinecraft();
private final BlockPos.MutableBlockPos pos = new BlockPos.MutableBlockPos();
private WorldClient world = null;

@Override
public boolean prepareChunk(int chunkX, int chunkZ) {
world = client.theWorld;
Expand All @@ -19,8 +20,7 @@ public boolean prepareChunk(int chunkX, int chunkZ) {

@Override
public boolean isOpaqueFullCube(int x, int y, int z) {
BlockPos pos = new BlockPos(x, y, z);
return world.getBlockState(pos).getBlock().isOpaqueCube();
return world.getBlockState(pos.set(x, y, z)).getBlock().isOpaqueCube();
}

@Override
Expand Down