[ci skip] Add more patch identifying comments, cleanup

This commit is contained in:
Nassim Jahnke
2024-01-21 17:39:05 +01:00
parent db4ed47134
commit bc99c40604
31 changed files with 129 additions and 244 deletions

View File

@@ -55,7 +55,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
int k = 1 + randomsource.nextInt(difficultydamagescaler.getDifficulty().getId() + 1);
for (int l = 0; l < k; ++l) {
+ // Paper start
+ // Paper start - PhantomPreSpawnEvent
+ com.destroystokyo.paper.event.entity.PhantomPreSpawnEvent event = new com.destroystokyo.paper.event.entity.PhantomPreSpawnEvent(io.papermc.paper.util.MCUtil.toLocation(world, blockposition1), entityplayer.getBukkitEntity(), org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL);
+ if (!event.callEvent()) {
+ if (event.shouldAbortSpawn()) {
@@ -63,11 +63,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ continue;
+ }
+ // Paper end
+ // Paper end - PhantomPreSpawnEvent
Phantom entityphantom = (Phantom) EntityType.PHANTOM.create(world);
if (entityphantom != null) {
+ entityphantom.setSpawningEntity(entityplayer.getUUID()); // Paper
+ entityphantom.setSpawningEntity(entityplayer.getUUID()); // Paper - PhantomPreSpawnEvent
entityphantom.moveTo(blockposition1, 0.0F, 0.0F);
groupdataentity = entityphantom.finalizeSpawn(world, difficultydamagescaler, MobSpawnType.NATURAL, groupdataentity, (CompoundTag) null);
world.addFreshEntityWithPassengers(entityphantom, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit