readd chunk pos long optimization
This commit is contained in:
@@ -86,7 +86,7 @@
|
||||
+ flag = true; // Paper
|
||||
+ // CraftBukkit start
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
|
||||
+ continue;
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (!serverLevel.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER)) {
|
||||
+ // CraftBukkit end
|
||||
@@ -106,12 +106,11 @@
|
||||
}
|
||||
|
||||
public void load(@Nullable Level level, BlockPos pos, CompoundTag tag) {
|
||||
- this.spawnDelay = tag.getShort("Delay");
|
||||
+ // Paper start - use larger int if set
|
||||
+ if (tag.contains("Paper.Delay")) {
|
||||
+ this.spawnDelay = tag.getInt("Paper.Delay");
|
||||
+ } else {
|
||||
+ this.spawnDelay = tag.getShort("Delay");
|
||||
this.spawnDelay = tag.getShort("Delay");
|
||||
+ }
|
||||
+ // Paper end
|
||||
boolean flag = tag.contains("SpawnData", 10);
|
||||
|
||||
Reference in New Issue
Block a user