13
0
geforkt von Mirrors/Paper

20 Zeilen
963 B
Diff

2021-03-16 09:00:00 +11:00
--- a/net/minecraft/world/level/MobSpawnerAbstract.java
+++ b/net/minecraft/world/level/MobSpawnerAbstract.java
@@ -47,6 +47,7 @@
public void setEntityId(EntityTypes<?> entitytypes) {
this.nextSpawnData.getEntityToSpawn().putString("id", IRegistry.ENTITY_TYPE.getKey(entitytypes).toString());
+ this.spawnPotentials = SimpleWeightedRandomList.empty(); // CraftBukkit - SPIGOT-3496, MC-92282
}
private boolean isNearPlayer(World world, BlockPosition blockposition) {
@@ -146,7 +147,7 @@
}
}
- if (!worldserver.tryAddFreshEntityWithPassengers(entity)) {
+ if (!worldserver.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER)) { // CraftBukkit
this.delay(worldserver, blockposition);
return;
}