Update to Minecraft 1.19.3

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-12-08 03:00:00 +11:00
parent a13136ada2
commit 8b26bb8f3e
305 changed files with 3331 additions and 2864 deletions

View File

@@ -72,21 +72,21 @@
Logger logger = EntityVillager.LOGGER;
Objects.requireNonNull(logger);
@@ -818,7 +838,12 @@
}
@@ -820,7 +840,12 @@
}
entitywitch.setPersistenceRequired();
- worldserver.addFreshEntityWithPassengers(entitywitch);
+ // CraftBukkit start
+ if (CraftEventFactory.callEntityTransformEvent(this, entitywitch, EntityTransformEvent.TransformReason.LIGHTNING).isCancelled()) {
+ return;
+ }
+ worldserver.addFreshEntityWithPassengers(entitywitch, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING);
+ // CraftBukkit end
this.releaseAllPois();
this.discard();
} else {
@@ -904,7 +929,7 @@
entitywitch.setPersistenceRequired();
- worldserver.addFreshEntityWithPassengers(entitywitch);
+ // CraftBukkit start
+ if (CraftEventFactory.callEntityTransformEvent(this, entitywitch, EntityTransformEvent.TransformReason.LIGHTNING).isCancelled()) {
+ return;
+ }
+ worldserver.addFreshEntityWithPassengers(entitywitch, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING);
+ // CraftBukkit end
this.releaseAllPois();
this.discard();
} else {
@@ -909,7 +934,7 @@
}).limit(5L).collect(Collectors.toList());
if (list1.size() >= j) {
@@ -95,7 +95,7 @@
list.forEach(SensorGolemLastSeen::golemDetected);
}
}
@@ -961,7 +986,7 @@
@@ -966,7 +991,7 @@
@Override
public void startSleeping(BlockPosition blockposition) {
super.startSleeping(blockposition);
@@ -104,7 +104,7 @@
this.brain.eraseMemory(MemoryModuleType.WALK_TARGET);
this.brain.eraseMemory(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE);
}
@@ -969,7 +994,7 @@
@@ -974,7 +999,7 @@
@Override
public void stopSleeping() {
super.stopSleeping();