mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 15:12:13 -07:00
[ci skip] Add more identifying patch comments
This commit is contained in:
@@ -13,19 +13,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
public static void handleBlockDropItemEvent(Block block, BlockState state, ServerPlayer player, List<ItemEntity> items) {
|
||||
- BlockDropItemEvent event = new BlockDropItemEvent(block, state, player.getBukkitEntity(), Lists.transform(items, (item) -> (org.bukkit.entity.Item) item.getBukkitEntity()));
|
||||
+ // Paper start
|
||||
+ // Paper start - Allow adding items to BlockDropItemEvent
|
||||
+ List<Item> list = new ArrayList<>();
|
||||
+ for (ItemEntity item : items) {
|
||||
+ list.add((Item) item.getBukkitEntity());
|
||||
+ }
|
||||
+ BlockDropItemEvent event = new BlockDropItemEvent(block, state, player.getBukkitEntity(), list);
|
||||
+ // Paper end
|
||||
+ // Paper end - Allow adding items to BlockDropItemEvent
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
|
||||
if (!event.isCancelled()) {
|
||||
- for (ItemEntity item : items) {
|
||||
- item.level().addFreshEntity(item);
|
||||
+ // Paper start
|
||||
+ // Paper start - Allow adding items to BlockDropItemEvent
|
||||
+ for (Item bukkit : list) {
|
||||
+ if (!bukkit.isValid()) {
|
||||
+ Entity item = ((org.bukkit.craftbukkit.entity.CraftItem) bukkit).getHandle();
|
||||
@@ -38,7 +38,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ bukkit.remove();
|
||||
+ }
|
||||
}
|
||||
+ // Paper end
|
||||
+ // Paper end - Allow adding items to BlockDropItemEvent
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user