b31089a929
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: d264e972 #591: Add option for a consumer before spawning an item 1c537fce #590: Add spawn and transform reasons for piglin zombification. CraftBukkit Changes: ee5006d1 #810: Add option for a consumer before spawning an item f6a39d3c #809: Add spawn and transform reasons for piglin zombification. 0c24068a Organise imports Spigot Changes: bff52619 Organise imports
25 Zeilen
1.7 KiB
Diff
25 Zeilen
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
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/server/TileEntityCampfire.java b/src/main/java/net/minecraft/server/TileEntityCampfire.java
|
|
index 51e9cba5c9c99f2b73052e8fae499b68e6fae2a2..c56c588f508b51677c599412215f043aa0a35f98 100644
|
|
--- a/src/main/java/net/minecraft/server/TileEntityCampfire.java
|
|
+++ b/src/main/java/net/minecraft/server/TileEntityCampfire.java
|
|
@@ -75,7 +75,11 @@ public class TileEntityCampfire extends TileEntity implements Clearable, ITickab
|
|
result = blockCookEvent.getResult();
|
|
itemstack1 = CraftItemStack.asNMSCopy(result);
|
|
// CraftBukkit end
|
|
- InventoryUtils.dropItem(this.world, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), itemstack1);
|
|
+ // Paper start
|
|
+ EntityItem droppedItem = new EntityItem(this.world, blockposition.getX() + 0.5D, blockposition.getY() + 0.5D, blockposition.getZ() + 0.5D, itemstack1.cloneAndSubtract(this.world.random.nextInt(21) + 10));
|
|
+ droppedItem.setMot(this.world.random.nextGaussian() * 0.05D, this.world.random.nextGaussian() * 0.05D + 0.2D, this.world.random.nextGaussian() * 0.05D);
|
|
+ this.world.addEntity(droppedItem);
|
|
+ // Paper end
|
|
this.items.set(i, ItemStack.b);
|
|
this.k();
|
|
}
|