diff options
Diffstat (limited to 'patches/unapplied/server/0476-Fix-item-locations-dropped-from-campfires.patch')
-rw-r--r-- | patches/unapplied/server/0476-Fix-item-locations-dropped-from-campfires.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/patches/unapplied/server/0476-Fix-item-locations-dropped-from-campfires.patch b/patches/unapplied/server/0476-Fix-item-locations-dropped-from-campfires.patch new file mode 100644 index 0000000000..d8e81d50ef --- /dev/null +++ b/patches/unapplied/server/0476-Fix-item-locations-dropped-from-campfires.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: William Blake Galbreath <[email protected]> +Date: Sat, 3 Oct 2020 20:32:25 -0500 +Subject: [PATCH] Fix item locations dropped from campfires + +Fixes #4259 by not flooring the blockposition among other weirdness + +diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java +index c4cf6abf0a962794ddbb4d7a691406054062ffee..24e2063db933bfbc8fc1f34edb8106ae4d7c633c 100644 +--- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java ++++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java +@@ -82,7 +82,11 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { + result = blockCookEvent.getResult(); + itemstack1 = CraftItemStack.asNMSCopy(result); + // CraftBukkit end +- Containers.dropItemStack(world, (double) pos.getX(), (double) pos.getY(), (double) pos.getZ(), itemstack1); ++ // Paper start ++ net.minecraft.world.entity.item.ItemEntity droppedItem = new net.minecraft.world.entity.item.ItemEntity(world, pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D, itemstack1.split(world.random.nextInt(21) + 10)); ++ droppedItem.setDeltaMovement(world.random.nextGaussian() * 0.05D, world.random.nextGaussian() * 0.05D + 0.2D, world.random.nextGaussian() * 0.05D); ++ world.addFreshEntity(droppedItem); ++ // Paper end + campfire.items.set(i, ItemStack.EMPTY); + world.sendBlockUpdated(pos, state, state, 3); + world.gameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(state)); |