[ci skip] Add more identifying patch comments

This commit is contained in:
Nassim Jahnke
2024-01-18 15:56:25 +01:00
parent 3a0aff9ba9
commit 16f89b4fa7
29 changed files with 107 additions and 89 deletions

View File

@@ -12,14 +12,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe
entityitem.setDefaultPickUpDelay();
+ // Paper start
+ // Paper start - Call EntityDropItemEvent
+ return this.spawnAtLocation(entityitem);
+ }
+ }
+ @Nullable
+ public ItemEntity spawnAtLocation(ItemEntity entityitem) {
+ {
+ // Paper end
+ // Paper end - Call EntityDropItemEvent
// CraftBukkit start
EntityDropItemEvent event = new EntityDropItemEvent(this.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
Bukkit.getPluginManager().callEvent(event);
@@ -32,7 +32,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
entityitem.setDeltaMovement((double) (0.3F * -Mth.sin(Dolphin.this.getYRot() * 0.017453292F) * Mth.cos(Dolphin.this.getXRot() * 0.017453292F) + Mth.cos(f1) * f2), (double) (0.3F * Mth.sin(Dolphin.this.getXRot() * 0.017453292F) * 1.5F), (double) (0.3F * Mth.cos(Dolphin.this.getYRot() * 0.017453292F) * Mth.cos(Dolphin.this.getXRot() * 0.017453292F) + Mth.sin(f1) * f2));
- Dolphin.this.level().addFreshEntity(entityitem);
+ Dolphin.this.spawnAtLocation(entityitem); // Paper - call EntityDropItemEvent
+ Dolphin.this.spawnAtLocation(entityitem); // Paper - Call EntityDropItemEvent
}
}
}
@@ -45,7 +45,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
entityitem.setThrower(this);
this.playSound(SoundEvents.FOX_SPIT, 1.0F, 1.0F);
- this.level().addFreshEntity(entityitem);
+ this.spawnAtLocation(entityitem); // Paper - call EntityDropItemEvent
+ this.spawnAtLocation(entityitem); // Paper - Call EntityDropItemEvent
}
}
@@ -53,7 +53,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
ItemEntity entityitem = new ItemEntity(this.level(), this.getX(), this.getY(), this.getZ(), stack);
- this.level().addFreshEntity(entityitem);
+ this.spawnAtLocation(entityitem); // Paper - call EntityDropItemEvent
+ this.spawnAtLocation(entityitem); // Paper - Call EntityDropItemEvent
}
@Override
@@ -67,7 +67,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- this.level().addFreshEntity(entityitem);
- return true;
+ return this.spawnAtLocation(entityitem) != null; // Paper - call EntityDropItemEvent by calling spawnAtLocation.
+ return this.spawnAtLocation(entityitem) != null; // Paper - Call EntityDropItemEvent
}
}
@@ -79,10 +79,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
entityitem.setDefaultPickUpDelay();
this.finalizeSpawnChildFromBreeding(world, other, (AgeableMob) null);
+ if (this.spawnAtLocation(entityitem) != null) { // Paper - call EntityDropItemEvent
+ if (this.spawnAtLocation(entityitem) != null) { // Paper - Call EntityDropItemEvent
this.playSound(SoundEvents.SNIFFER_EGG_PLOP, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 0.5F);
- world.addFreshEntity(entityitem);
+ } // Paper
+ } // Paper - Call EntityDropItemEvent
}
@Override