Package pneumaticCraft.api.client.pneumaticHelmet

Examples of pneumaticCraft.api.client.pneumaticHelmet.IHackableBlock.onHackFinished()


    @Override
    public void handleClientSide(PacketHackingBlockFinish message, EntityPlayer player){
        IHackableBlock hackableBlock = HackableHandler.getHackableForCoord(player.worldObj, message.x, message.y, message.z, player);
        if(hackableBlock != null) {
            hackableBlock.onHackFinished(player.worldObj, message.x, message.y, message.z, player);
            PneumaticCraft.proxy.getHackTickHandler().trackBlock(new WorldAndCoord(player.worldObj, message.x, message.y, message.z), hackableBlock);
            CommonHUDHandler.getHandlerForPlayer(player).setHackedBlock(null);
            player.worldObj.playSound(message.x, message.y, message.z, "PneumaticCraft:helmetHackFinish", 1.0F, 1.0F, false);
        }
    }
View Full Code Here


    private void handleHacking(EntityPlayer player){
        if(hackedBlock != null) {
            IHackableBlock hackableBlock = HackableHandler.getHackableForCoord(hackedBlock, player);
            if(hackableBlock != null) {
                if(++hackTime >= hackableBlock.getHackTime(hackedBlock.world, hackedBlock.x, hackedBlock.y, hackedBlock.z, player)) {
                    hackableBlock.onHackFinished(player.worldObj, hackedBlock.x, hackedBlock.y, hackedBlock.z, player);
                    PneumaticCraft.proxy.getHackTickHandler().trackBlock(hackedBlock, hackableBlock);
                    NetworkHandler.sendToAllAround(new PacketHackingBlockFinish(hackedBlock), player.worldObj);
                    setHackedBlock(null);
                }
            } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.