Fix ghost rail iteration CME

This commit is contained in:
Vincent Lee committed 2019-11-06 16:45:43 -06:00
1 parent cd435822d7
commit a2b2b3e4c6
1 file changed
+4
@@ -89,6 +89,10 @@ public class BlockGhostRail extends AbstractRailBlock {
private void worldTick(TickEvent.WorldTickEvent evt) {
if(!evt.world.isRemote() && evt.phase == TickEvent.Phase.END) {
for (AbstractMinecartEntity c : carts.getOrDefault(evt.world.getDimension().getType(), Collections.emptySet())) {
if (!c.isAlive() || !c.isAddedToWorld()) {
continue;
}
BlockPos entPos = new BlockPos(c);
BlockState state = c.world.getBlockState(entPos);
Block block = state.getBlock();