2020-10-04 01:32:52 +00:00
|
|
|
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
|
|
|
|
|
2021-03-16 07:19:45 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityCampfire.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityCampfire.java
|
|
|
|
index df010dc740f2dd647a418ba4e425ce3a3b1d79e2..bd213deedf47e71f0983bb950c7e74d4bf30f54e 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityCampfire.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityCampfire.java
|
|
|
|
@@ -92,7 +92,11 @@ public class TileEntityCampfire extends TileEntity implements Clearable, ITickab
|
2020-10-04 01:32:52 +00:00
|
|
|
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();
|
|
|
|
}
|