readd beacon effect cause
This commit is contained in:
@@ -530,30 +530,25 @@
|
||||
return chunk.getBlockState(pos);
|
||||
}
|
||||
}
|
||||
@@ -454,32 +_,54 @@
|
||||
@@ -454,32 +_,49 @@
|
||||
this.pendingBlockEntityTickers.clear();
|
||||
}
|
||||
|
||||
- Iterator<TickingBlockEntity> iterator = this.blockEntityTickers.iterator();
|
||||
+ // Spigot start
|
||||
+ // Iterator<TickingBlockEntity> iterator = this.blockEntityTickers.iterator();
|
||||
boolean runsNormally = this.tickRateManager().runsNormally();
|
||||
|
||||
- while (iterator.hasNext()) {
|
||||
- TickingBlockEntity tickingBlockEntity = iterator.next();
|
||||
+ int tilesThisCycle = 0;
|
||||
+ var toRemove = new it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet<TickingBlockEntity>(); // Paper - Fix MC-117075; use removeAll
|
||||
+ toRemove.add(null); // Paper - Fix MC-117075
|
||||
+ for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
|
||||
+ this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0;
|
||||
+ TickingBlockEntity tickingBlockEntity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition);
|
||||
+ TickingBlockEntity tickingBlockEntity = this.blockEntityTickers.get(this.tileTickPosition);
|
||||
+ // Spigot end
|
||||
if (tickingBlockEntity.isRemoved()) {
|
||||
- iterator.remove();
|
||||
+ // Spigot start
|
||||
+ tilesThisCycle--;
|
||||
+ toRemove.add(tickingBlockEntity); // Paper - Fix MC-117075; use removeAll
|
||||
+ // Spigot end
|
||||
+ toRemove.add(tickingBlockEntity); // Paper - Fix MC-117075; use removeAll
|
||||
} else if (runsNormally && this.shouldTickBlocksAt(tickingBlockEntity.getPos())) {
|
||||
tickingBlockEntity.tick();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user