Skip to content

Commit ed1525c

Browse files
committed
Revert "Don't block culling block entities on sub-levels, they're not affected"
This reverts commit 08e1388.
1 parent 71727bd commit ed1525c

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/main/java/dev/lapt/nowheel/NowheelMod.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ private void hookSable(ClientTickEvent.Post event) {
5757
sableHooked = true;
5858
NeoForge.EVENT_BUS.unregister(this);
5959
ec.addDynamicEntityWhitelist(SableCompat::onSubLevel);
60+
ec.addDynamicBlockEntityWhitelist(SableCompat::onSubLevel);
6061
LOGGER.info("Nowheel Sable compat active");
6162
}
6263
}

src/main/java/dev/lapt/nowheel/compat/SableCompat.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import dev.ryanhcode.sable.companion.SableCompanion;
44
import net.minecraft.world.entity.Entity;
5+
import net.minecraft.world.level.block.entity.BlockEntity;
56

67
public final class SableCompat {
78

@@ -10,4 +11,8 @@ private SableCompat() { }
1011
public static boolean onSubLevel(Entity entity) {
1112
return SableCompanion.INSTANCE.getContaining(entity) != null;
1213
}
14+
15+
public static boolean onSubLevel(BlockEntity blockEntity) {
16+
return SableCompanion.INSTANCE.getContaining(blockEntity) != null;
17+
}
1318
}

0 commit comments

Comments
 (0)