From 4f7c34aec9fc5835f27d52790b677b79b628bff6 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 11 Mar 2024 12:24:28 -0400 Subject: [PATCH] Refactor out item useID --- src/engine/net/client/handlers/ObjectActionMsgHandler.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/engine/net/client/handlers/ObjectActionMsgHandler.java b/src/engine/net/client/handlers/ObjectActionMsgHandler.java index b406bce6..9e92da17 100644 --- a/src/engine/net/client/handlers/ObjectActionMsgHandler.java +++ b/src/engine/net/client/handlers/ObjectActionMsgHandler.java @@ -16,7 +16,6 @@ import engine.net.client.ClientConnection; import engine.net.client.msg.*; import engine.objects.*; import engine.powers.PowersBase; -import engine.powers.poweractions.AbstractPowerAction; import org.pmw.tinylog.Logger; import java.util.ArrayList; @@ -532,9 +531,9 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler { if (waterbucketBypass == false) { String powerString = item.template.item_power_action.keySet().iterator().next(); - AbstractPowerAction powerAction = PowersManager.powerActionsByIDString.get(powerString); + PowersBase powerAction = PowersManager.powersBaseByIDString.get(powerString); int powerValue = item.template.item_power_action.get(powerString)[0]; - PowersManager.applyPower(player, target, Vector3fImmutable.ZERO, powerAction.getUUID(), powerValue, true); + PowersManager.applyPower(player, target, Vector3fImmutable.ZERO, powerAction.getToken(), powerValue, true); } itemMan.consume(item); } else //just remove the item at this point