Skip to content

Commit

Permalink
iterate over chunkentities in scheduler here
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Feb 29, 2024
1 parent c15b8b4 commit e93bea7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private void run() {
for (World world : plugin.getServer().getWorlds()) {
for (Chunk chunk : world.getLoadedChunks()) {
plugin.getServer().getRegionScheduler().run(plugin, world, chunk.getX(), chunk.getZ(), checkChunk -> {
for (Entity entity : world.getEntities()) {
for (Entity entity : chunk.getEntities()) {
entity.getScheduler().run(plugin, checkEntity -> {
if (entity.getType() == EntityType.FALLING_BLOCK && entity.getTicksLived() > max_alive_time) {
entity.remove();
Expand Down

0 comments on commit e93bea7

Please sign in to comment.