From 8a6c5f3e9ab1e2162142ee5f40a696e92f670dd1 Mon Sep 17 00:00:00 2001 From: LemADEC Date: Mon, 29 Feb 2016 23:54:23 +0100 Subject: [PATCH] Fixed #137 Laser + Camera reporting invalid Video channel in SMP --- .../java/cr0s/warpdrive/block/weapon/BlockLaserCamera.java | 6 +----- .../cr0s/warpdrive/block/weapon/TileEntityLaserCamera.java | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/cr0s/warpdrive/block/weapon/BlockLaserCamera.java b/src/main/java/cr0s/warpdrive/block/weapon/BlockLaserCamera.java index 63596eac..9fc64212 100644 --- a/src/main/java/cr0s/warpdrive/block/weapon/BlockLaserCamera.java +++ b/src/main/java/cr0s/warpdrive/block/weapon/BlockLaserCamera.java @@ -62,10 +62,6 @@ public class BlockLaserCamera 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 (!ClientCameraHandler.isOverlayEnabled) { @@ -76,7 +72,7 @@ public class BlockLaserCamera extends BlockAbstractContainer { getLocalizedName()) + StatCollector.translateToLocalFormatted("warpdrive.error.badTileEntity")); WarpDrive.logger.error("Block " + this + " with invalid tile entity " + tileEntity); } - return true; + return false; } } diff --git a/src/main/java/cr0s/warpdrive/block/weapon/TileEntityLaserCamera.java b/src/main/java/cr0s/warpdrive/block/weapon/TileEntityLaserCamera.java index 38b9c8f1..d1582704 100644 --- a/src/main/java/cr0s/warpdrive/block/weapon/TileEntityLaserCamera.java +++ b/src/main/java/cr0s/warpdrive/block/weapon/TileEntityLaserCamera.java @@ -100,7 +100,7 @@ public class TileEntityLaserCamera extends TileEntityLaser implements IVideoChan public String getStatus() { return StatCollector.translateToLocalFormatted("warpdrive.guide.prefix", getBlockType().getLocalizedName()) - + getBeamFrequencyStatus() + "\n" + getVideoChannelStatus(); + + (worldObj.isRemote ? getVideoChannelStatus() : getBeamFrequencyStatus()); } @Override