Fixed #137 Laser + Camera reporting invalid Video channel in SMP

This commit is contained in:
LemADEC 2016-02-29 23:54:23 +01:00
parent 8ec8565e76
commit 8a6c5f3e9a
2 changed files with 2 additions and 6 deletions

View file

@ -62,10 +62,6 @@ public class BlockLaserCamera extends BlockAbstractContainer {
*/ */
@Override @Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int side, float hitX, float hitY, float hitZ) { 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) { if (entityPlayer.getHeldItem() == null) {
TileEntity tileEntity = world.getTileEntity(x, y, z); TileEntity tileEntity = world.getTileEntity(x, y, z);
if (!ClientCameraHandler.isOverlayEnabled) { if (!ClientCameraHandler.isOverlayEnabled) {
@ -76,7 +72,7 @@ public class BlockLaserCamera extends BlockAbstractContainer {
getLocalizedName()) + StatCollector.translateToLocalFormatted("warpdrive.error.badTileEntity")); getLocalizedName()) + StatCollector.translateToLocalFormatted("warpdrive.error.badTileEntity"));
WarpDrive.logger.error("Block " + this + " with invalid tile entity " + tileEntity); WarpDrive.logger.error("Block " + this + " with invalid tile entity " + tileEntity);
} }
return true; return false;
} }
} }

View file

@ -100,7 +100,7 @@ public class TileEntityLaserCamera extends TileEntityLaser implements IVideoChan
public String getStatus() { public String getStatus() {
return StatCollector.translateToLocalFormatted("warpdrive.guide.prefix", return StatCollector.translateToLocalFormatted("warpdrive.guide.prefix",
getBlockType().getLocalizedName()) getBlockType().getLocalizedName())
+ getBeamFrequencyStatus() + "\n" + getVideoChannelStatus(); + (worldObj.isRemote ? getVideoChannelStatus() : getBeamFrequencyStatus());
} }
@Override @Override