Fix client side chunk unloads for tile entities causing a crash.
@@ -277,12 +277,14 @@ public static boolean shouldRefresh(TileEntity tile, net.minecraft.world.World w
*/
@Overwrite
public static void onTileChunkUnload(TileEntity te) {
+ if (!te.getWorld().isRemote) {
try (final PhaseContext<?> o = BlockPhase.State.TILE_CHUNK_UNLOAD.createPhaseContext()
.source(te)
.buildAndSwitch()) {
te.onChunkUnload();
}
}
+ }
// World
