PaperMC/paper-server/nms-patches/net/minecraft/world/level/MobSpawnerAbstract.patch
CraftBukkit/Spigot 43702a9e10 Update to Minecraft 1.18-pre5
By: md_5 <git@md-5.net>
2021-11-22 09:00:00 +11:00

19 lines
963 B
Diff

--- 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;
}