geforkt von Mirrors/Paper
40 Zeilen
1.7 KiB
Diff
40 Zeilen
1.7 KiB
Diff
--- a/net/minecraft/server/MobSpawnerAbstract.java
|
|
+++ b/net/minecraft/server/MobSpawnerAbstract.java
|
|
@@ -12,13 +12,13 @@
|
|
private MobSpawnerData spawnData = new MobSpawnerData();
|
|
private double d;
|
|
private double e;
|
|
- private int minSpawnDelay = 200;
|
|
- private int maxSpawnDelay = 800;
|
|
- private int spawnCount = 4;
|
|
+ public int minSpawnDelay = 200; // CraftBukkit private -> public
|
|
+ public int maxSpawnDelay = 800; // CraftBukkit private -> public
|
|
+ public int spawnCount = 4; // CraftBukkit private -> public
|
|
private Entity i;
|
|
- private int maxNearbyEntities = 6;
|
|
- private int requiredPlayerRange = 16;
|
|
- private int spawnRange = 4;
|
|
+ public int maxNearbyEntities = 6; // CraftBukkit private -> public
|
|
+ public int requiredPlayerRange = 16; // CraftBukkit private -> public
|
|
+ public int spawnRange = 4; // CraftBukkit private -> public
|
|
|
|
public MobSpawnerAbstract() {}
|
|
|
|
@@ -32,6 +32,7 @@
|
|
public void setMobName(@Nullable MinecraftKey minecraftkey) {
|
|
if (minecraftkey != null) {
|
|
this.spawnData.b().setString("id", minecraftkey.toString());
|
|
+ this.mobs.clear(); // CraftBukkit - SPIGOT-3496, MC-92282
|
|
}
|
|
|
|
}
|
|
@@ -102,7 +103,7 @@
|
|
((EntityInsentient) entity).prepare(world.D(new BlockPosition(entity)), (GroupDataEntity) null);
|
|
}
|
|
|
|
- ChunkRegionLoader.a(entity, world);
|
|
+ ChunkRegionLoader.a(entity, world, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
|
world.triggerEffect(2004, blockposition, 0);
|
|
if (entityinsentient != null) {
|
|
entityinsentient.doSpawnEffect();
|