diff options
Diffstat (limited to 'nms-patches/SpawnerCreature.patch')
-rw-r--r-- | nms-patches/SpawnerCreature.patch | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/nms-patches/SpawnerCreature.patch b/nms-patches/SpawnerCreature.patch index 4da78171..42f79568 100644 --- a/nms-patches/SpawnerCreature.patch +++ b/nms-patches/SpawnerCreature.patch @@ -1,20 +1,15 @@ --- a/net/minecraft/server/SpawnerCreature.java +++ b/net/minecraft/server/SpawnerCreature.java -@@ -1,15 +1,19 @@ - package net.minecraft.server; - --import com.google.common.collect.Sets; - import java.util.Iterator; - import java.util.List; +@@ -6,10 +6,16 @@ import java.util.Random; --import java.util.Set; -+ + import java.util.Set; + +// CraftBukkit start +import org.bukkit.craftbukkit.util.LongHash; +import org.bukkit.craftbukkit.util.LongHashSet; +import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; +// CraftBukkit end - ++ public final class SpawnerCreature { private static final int a = (int) Math.pow(17.0D, 2.0D); @@ -23,7 +18,7 @@ public SpawnerCreature() {} -@@ -36,15 +40,18 @@ +@@ -36,15 +42,18 @@ for (int i1 = -8; i1 <= 8; ++i1) { for (k = -8; k <= 8; ++k) { boolean flag4 = i1 == -8 || i1 == 8 || k == -8 || k == 8; @@ -47,7 +42,7 @@ } } } -@@ -62,9 +69,31 @@ +@@ -62,9 +71,31 @@ for (int k1 = 0; k1 < j; ++k1) { EnumCreatureType enumcreaturetype = aenumcreaturetype[k1]; @@ -80,7 +75,7 @@ if (k <= l1) { BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); -@@ -72,8 +101,10 @@ +@@ -72,8 +103,10 @@ label120: while (iterator1.hasNext()) { @@ -93,7 +88,7 @@ int i2 = blockposition1.getX(); int j2 = blockposition1.getY(); int k2 = blockposition1.getZ(); -@@ -126,7 +157,7 @@ +@@ -126,7 +159,7 @@ groupdataentity = entityinsentient.prepare(worldserver.D(new BlockPosition(entityinsentient)), groupdataentity); if (entityinsentient.canSpawn()) { ++l2; @@ -102,7 +97,7 @@ } else { entityinsentient.die(); } -@@ -226,8 +257,10 @@ +@@ -226,8 +259,10 @@ } entityinsentient.setPositionRotation((double) ((float) j1 + 0.5F), (double) blockposition.getY(), (double) ((float) k1 + 0.5F), random.nextFloat() * 360.0F, 0.0F); |