From 8f7a88cc91280295355ec989f080e8667184ca25 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 20 Nov 2024 21:42:05 +1100 Subject: [PATCH] SPIGOT-7960: Fix inconsistency between natural item drop coordinates By: md_5 --- .../src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 9fa5252463..e881dd0699 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -569,8 +569,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { Preconditions.checkArgument(loc != null, "Location cannot be null"); Preconditions.checkArgument(item != null, "ItemStack cannot be null"); - double xs = 0.5D + MathHelper.nextDouble(world.random, -0.25D, 0.25D); - double ys = 0.5D + MathHelper.nextDouble(world.random, -0.25D, 0.25D) - ((double) EntityTypes.ITEM.getHeight() / 2.0D); + double xs = MathHelper.nextDouble(world.random, -0.25D, 0.25D); + double ys = MathHelper.nextDouble(world.random, -0.25D, 0.25D) - ((double) EntityTypes.ITEM.getHeight() / 2.0D); double zs = MathHelper.nextDouble(world.random, -0.25D, 0.25D); loc = loc.clone().add(xs, ys, zs); return dropItem(loc, item, function);