mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
43702a9e10
By: md_5 <git@md-5.net>
19 lines
963 B
Diff
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;
|
|
}
|