mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 10:17:38 +01:00
8b26bb8f3e
By: md_5 <git@md-5.net>
20 lines
1.1 KiB
Diff
20 lines
1.1 KiB
Diff
--- a/net/minecraft/world/level/MobSpawnerAbstract.java
|
|
+++ b/net/minecraft/world/level/MobSpawnerAbstract.java
|
|
@@ -50,6 +50,7 @@
|
|
|
|
public void setEntityId(EntityTypes<?> entitytypes, @Nullable World world, RandomSource randomsource, BlockPosition blockposition) {
|
|
this.getOrCreateNextSpawnData(world, randomsource, blockposition).getEntityToSpawn().putString("id", BuiltInRegistries.ENTITY_TYPE.getKey(entitytypes).toString());
|
|
+ this.spawnPotentials = SimpleWeightedRandomList.empty(); // CraftBukkit - SPIGOT-3496, MC-92282
|
|
}
|
|
|
|
private boolean isNearPlayer(World world, BlockPosition blockposition) {
|
|
@@ -152,7 +153,7 @@
|
|
}
|
|
}
|
|
|
|
- if (!worldserver.tryAddFreshEntityWithPassengers(entity)) {
|
|
+ if (!worldserver.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER)) { // CraftBukkit
|
|
this.delay(worldserver, blockposition);
|
|
return;
|
|
}
|