Search in sources :

Example 6 with IHackableBlock

use of me.desht.pneumaticcraft.api.client.pneumaticHelmet.IHackableBlock in project pnc-repressurized by TeamPneumatic.

the class PacketHackingBlockFinish method handleClientSide.

@Override
public void handleClientSide(PacketHackingBlockFinish message, EntityPlayer player) {
    IHackableBlock hackableBlock = HackableHandler.getHackableForCoord(player.world, message.pos, player);
    if (hackableBlock != null) {
        hackableBlock.onHackFinished(player.world, message.pos, player);
        PneumaticCraftRepressurized.proxy.getHackTickHandler().trackBlock(new WorldAndCoord(player.world, message.pos), hackableBlock);
        CommonHUDHandler.getHandlerForPlayer(player).setHackedBlock(null);
        player.playSound(Sounds.HELMET_HACK_FINISH, 1.0F, 1.0F);
    }
}
Also used : IHackableBlock(me.desht.pneumaticcraft.api.client.pneumaticHelmet.IHackableBlock) WorldAndCoord(me.desht.pneumaticcraft.common.util.WorldAndCoord)

Aggregations

IHackableBlock (me.desht.pneumaticcraft.api.client.pneumaticHelmet.IHackableBlock)6 WorldAndCoord (me.desht.pneumaticcraft.common.util.WorldAndCoord)3 HashMap (java.util.HashMap)2 Map (java.util.Map)2 Block (net.minecraft.block.Block)2 IBlockTrackEntry (me.desht.pneumaticcraft.api.client.pneumaticHelmet.IBlockTrackEntry)1 IHackableEntity (me.desht.pneumaticcraft.api.client.pneumaticHelmet.IHackableEntity)1 PacketDescriptionPacketRequest (me.desht.pneumaticcraft.common.network.PacketDescriptionPacketRequest)1 PacketHackingBlockFinish (me.desht.pneumaticcraft.common.network.PacketHackingBlockFinish)1 PacketHackingEntityFinish (me.desht.pneumaticcraft.common.network.PacketHackingEntityFinish)1 World (net.minecraft.world.World)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1