aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2020-01-09 12:46:47 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2020-01-09 12:46:47 +0000
commit63e94d2dda9495c5894f942902a76c0c17871381 (patch)
tree32958f0fb81a177f12a17f54436c71b701334f04 /src/Java/gtPlusPlus/xmod
parent872b5b6c96b261e5b06aa56f86c462938f14e2f4 (diff)
downloadGT5-Unofficial-63e94d2dda9495c5894f942902a76c0c17871381.tar.gz
GT5-Unofficial-63e94d2dda9495c5894f942902a76c0c17871381.tar.bz2
GT5-Unofficial-63e94d2dda9495c5894f942902a76c0c17871381.zip
$ Fixed Glider Handler using ClientSide code on the Server.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod')
-rw-r--r--src/Java/gtPlusPlus/xmod/ob/GliderHandler.java10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/Java/gtPlusPlus/xmod/ob/GliderHandler.java b/src/Java/gtPlusPlus/xmod/ob/GliderHandler.java
index 7a53572aae..a190511b02 100644
--- a/src/Java/gtPlusPlus/xmod/ob/GliderHandler.java
+++ b/src/Java/gtPlusPlus/xmod/ob/GliderHandler.java
@@ -35,15 +35,7 @@ public class GliderHandler {
return;
}
- ItemStack aItem = event.entityPlayer.getItemInUse();
- if (!ItemUtils.checkForInvalidItems(aItem)) {
- Logger.WARNING("[OpenBlocks] Item in use was invalid, trying currentlyEquipped.");
- aItem = event.entityPlayer.getCurrentEquippedItem();
- }
- if (!ItemUtils.checkForInvalidItems(aItem)) {
- Logger.WARNING("[OpenBlocks] Item in use was invalid, trying heldItem.");
- aItem = event.entityPlayer.getHeldItem();
- }
+ ItemStack aItem = PlayerUtils.getItemStackInPlayersHand(event.entityPlayer);
if (ItemUtils.checkForInvalidItems(aItem)) {
Class aItemGliderClass = ReflectionUtils.getClass("openblocks.common.item.ItemHangGlider");
if (aItemGliderClass.isInstance(aItem.getItem())) {