From 90e0ea23b96cc8574cf6d69c2acf0acd76074a17 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Wed, 18 Apr 2018 15:59:08 +0100 Subject: [PATCH] Fixes #1490 --- .../java/techreborn/items/tools/ItemNanosaber.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/techreborn/items/tools/ItemNanosaber.java b/src/main/java/techreborn/items/tools/ItemNanosaber.java index f146c0aca..ddd5b2445 100644 --- a/src/main/java/techreborn/items/tools/ItemNanosaber.java +++ b/src/main/java/techreborn/items/tools/ItemNanosaber.java @@ -190,10 +190,12 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo, IEnergy @Override public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) { if (stack.getTagCompound() != null && stack.getTagCompound().getBoolean("isActive") && !PoweredItem.canUseEnergy(cost, stack)) { - ChatUtils.sendNoSpamMessages(MessageIDs.nanosaberID, new TextComponentString( - TextFormatting.GRAY + I18n.format("techreborn.message.nanosaberEnergyError") + " " - + TextFormatting.GOLD + I18n - .format("techreborn.message.nanosaberDeactivating"))); + if(worldIn.isRemote){ + ChatUtils.sendNoSpamMessages(MessageIDs.nanosaberID, new TextComponentString( + TextFormatting.GRAY + I18n.format("techreborn.message.nanosaberEnergyError") + " " + + TextFormatting.GOLD + I18n + .format("techreborn.message.nanosaberDeactivating"))); + } stack.getTagCompound().setBoolean("isActive", false); } }