From 90d4832a202249319bc6d2a59fb1d5c65be005f6 Mon Sep 17 00:00:00 2001 From: LemADEC Date: Sat, 13 May 2017 19:02:40 +0200 Subject: [PATCH] Fixed weapon controller double guide message --- .../cr0s/warpdrive/block/weapon/BlockWeaponController.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/cr0s/warpdrive/block/weapon/BlockWeaponController.java b/src/main/java/cr0s/warpdrive/block/weapon/BlockWeaponController.java index 767e6cac..6510cc7b 100644 --- a/src/main/java/cr0s/warpdrive/block/weapon/BlockWeaponController.java +++ b/src/main/java/cr0s/warpdrive/block/weapon/BlockWeaponController.java @@ -71,6 +71,10 @@ public class BlockWeaponController extends BlockAbstractContainer { @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int side, float hitX, float hitY, float hitZ) { + if (world.isRemote) { + return false; + } + if (entityPlayer.getHeldItem() == null) { TileEntity tileEntity = world.getTileEntity(x, y, z); if (tileEntity instanceof TileEntityWeaponController) { @@ -80,7 +84,7 @@ public class BlockWeaponController extends BlockAbstractContainer { getLocalizedName()) + StatCollector.translateToLocalFormatted("warpdrive.error.badTileEntity")); WarpDrive.logger.error("Block " + this + " with invalid tile entity " + tileEntity); } - return false; + return true; } return false;