use of top.theillusivec4.polymorph.api.common.component.BlockEntityRecipeData in project Polymorph by TheIllusiveC4.
the class CommonEventsListener method worldTick.
private static void worldTick(final ServerWorld serverWorld) {
List<BlockEntity> toRemove = new ArrayList<>();
for (Map.Entry<BlockEntity, BlockEntityRecipeData> entry : TICKABLE_BLOCKS.entrySet()) {
BlockEntity be = entry.getKey();
World beWorld = be.getWorld();
if (be.isRemoved() || beWorld == null || beWorld.isClient()) {
toRemove.add(be);
} else {
entry.getValue().tick();
}
}
for (BlockEntity be : toRemove) {
TICKABLE_BLOCKS.remove(be);
}
}
Aggregations