Fixed weapon controller double guide message
This commit is contained in:
parent
68e0606a62
commit
90d4832a20
1 changed files with 5 additions and 1 deletions
|
@ -71,6 +71,10 @@ public class BlockWeaponController 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 (tileEntity instanceof TileEntityWeaponController) {
|
if (tileEntity instanceof TileEntityWeaponController) {
|
||||||
|
@ -80,7 +84,7 @@ public class BlockWeaponController 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 false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue