From d5cb385fc1c4d9400bfe3a65b885aa5adc1b799e Mon Sep 17 00:00:00 2001 From: Alexdoru <57050655+Alexdoru@users.noreply.github.com> Date: Wed, 4 Jun 2025 17:42:04 +0200 Subject: [PATCH] remove check who dropped the item --- .../github/inventory/item/WirelessMagnet.java | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/glodblock/github/inventory/item/WirelessMagnet.java b/src/main/java/com/glodblock/github/inventory/item/WirelessMagnet.java index aa0375f4..599b48ca 100644 --- a/src/main/java/com/glodblock/github/inventory/item/WirelessMagnet.java +++ b/src/main/java/com/glodblock/github/inventory/item/WirelessMagnet.java @@ -79,20 +79,17 @@ public class WirelessMagnet { if (closestPlayer == null || closestPlayer != player) continue; } - if (itemToGet.func_145800_j() == null || !itemToGet.func_145800_j().equals(player.getCommandSenderName())) { + if (itemToGet.delayBeforeCanPickup > 0) { itemToGet.delayBeforeCanPickup = 0; } - - if (itemToGet.delayBeforeCanPickup <= 0) { - playSound = true; - itemToGet.motionX = 0; - itemToGet.motionY = 0; - itemToGet.motionZ = 0; - itemToGet.setPosition( - player.posX - 0.2 + (world.rand.nextDouble() * 0.4), - player.posY - 0.6, - player.posZ - 0.2 + (world.rand.nextDouble() * 0.4)); - } + playSound = true; + itemToGet.motionX = 0; + itemToGet.motionY = 0; + itemToGet.motionZ = 0; + itemToGet.setPosition( + player.posX - 0.2 + (world.rand.nextDouble() * 0.4), + player.posY - 0.6, + player.posZ - 0.2 + (world.rand.nextDouble() * 0.4)); } if (playSound) {