mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 05:02:39 +00:00
Don't execute smeltery-blocks rightclick-interactions clientside #1527
This commit is contained in:
1 parent
763b449c41
commit
7e0b9faea4
2 files changed
+12
-18
No files matched your search
@@ -87,8 +87,10 @@ public class SearedBlock extends InventoryBlock
|
||||
if (player.isSneaking())
|
||||
return false;
|
||||
|
||||
FaucetLogic logic = (FaucetLogic) world.getTileEntity(x, y, z);
|
||||
logic.setActive(true);
|
||||
if(!world.isRemote) {
|
||||
FaucetLogic logic = (FaucetLogic) world.getTileEntity(x, y, z);
|
||||
logic.setActive(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -97,10 +99,11 @@ public class SearedBlock extends InventoryBlock
|
||||
|
||||
boolean activateCastingBlock (World world, int x, int y, int z, EntityPlayer player)
|
||||
{
|
||||
|
||||
CastingBlockLogic logic = (CastingBlockLogic) world.getTileEntity(x, y, z);
|
||||
logic.interact(player);
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
if(!world.isRemote) {
|
||||
CastingBlockLogic logic = (CastingBlockLogic) world.getTileEntity(x, y, z);
|
||||
logic.interact(player);
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -138,6 +138,7 @@ public class SmelteryBlock extends InventoryBlock
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @Override public int getRenderBlockPass() { return 1; }
|
||||
*/
|
||||
@@ -215,20 +216,10 @@ public class SmelteryBlock extends InventoryBlock
|
||||
@Override
|
||||
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int side, float clickX, float clickY, float clickZ)
|
||||
{
|
||||
if (player.isSneaking() || world.getBlockMetadata(x, y, z) != 0)
|
||||
if (world.getBlockMetadata(x, y, z) != 0)
|
||||
return false;
|
||||
|
||||
Integer integer = getGui(world, x, y, z, player);
|
||||
if (integer == null || integer == -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// world.markBlockForUpdate(x, y, z);
|
||||
player.openGui(getModInstance(), integer, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
return super.onBlockActivated(world, x,y,z, player, side, clickX, clickY, clickZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user