use of pneumaticCraft.client.render.pneumaticArmor.RenderBlockTarget in project PneumaticCraft by MineMaarten.
the class HackableHandler method isInDisplayCooldown.
private static boolean isInDisplayCooldown(IHackableBlock hackableBlock, IBlockAccess world, int x, int y, int z, EntityPlayer player) {
if (player.worldObj.isRemote) {
RenderBlockTarget target = HUDHandler.instance().getSpecificRenderer(BlockTrackUpgradeHandler.class).getTargetForCoord(x, y, z);
int requiredHackTime = hackableBlock.getHackTime(world, x, y, z, player);
return target != null && target.getHackTime() >= requiredHackTime && target.getHackTime() <= requiredHackTime + 20;
} else {
return false;
}
}
use of pneumaticCraft.client.render.pneumaticArmor.RenderBlockTarget in project PneumaticCraft by MineMaarten.
the class PacketHackingBlockStart method handleClientSide.
@Override
public void handleClientSide(PacketHackingBlockStart message, EntityPlayer player) {
CommonHUDHandler.getHandlerForPlayer(player).setHackedBlock(new WorldAndCoord(player.worldObj, message.x, message.y, message.z));
RenderBlockTarget target = HUDHandler.instance().getSpecificRenderer(BlockTrackUpgradeHandler.class).getTargetForCoord(message.x, message.y, message.z);
if (target != null)
target.onHackConfirmServer();
}
Aggregations