Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-22 09:00:00 +11:00
parent a852b81a69
commit 43702a9e10
700 changed files with 10286 additions and 10098 deletions

View File

@@ -1,19 +1,19 @@
--- a/net/minecraft/world/level/MobSpawnerAbstract.java
+++ b/net/minecraft/world/level/MobSpawnerAbstract.java
@@ -73,6 +73,7 @@
@@ -47,6 +47,7 @@
public void setMobName(EntityTypes<?> entitytypes) {
this.nextSpawnData.getEntity().setString("id", IRegistry.ENTITY_TYPE.getKey(entitytypes).toString());
+ this.spawnPotentials = MobSpawnerAbstract.EMPTY_POTENTIALS; // CraftBukkit - SPIGOT-3496, MC-92282
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 c(World world, BlockPosition blockposition) {
@@ -156,7 +157,7 @@
private boolean isNearPlayer(World world, BlockPosition blockposition) {
@@ -146,7 +147,7 @@
}
}
- if (!worldserver.addAllEntitiesSafely(entity)) {
+ if (!worldserver.addAllEntitiesSafely(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER)) { // CraftBukkit
this.d(worldserver, blockposition);
- if (!worldserver.tryAddFreshEntityWithPassengers(entity)) {
+ if (!worldserver.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER)) { // CraftBukkit
this.delay(worldserver, blockposition);
return;
}