Search in sources :

Example 1 with PacketSetExplosiveState

use of net.geforcemods.securitycraft.network.packets.PacketSetExplosiveState in project SecurityCraft by Geforce132.

the class GuiMRATActivate method actionPerformed.

@Override
protected void actionPerformed(GuiButton guibutton) {
    int[] coords = this.item.getTagCompound().getIntArray("mine" + (guibutton.id + 1));
    if (BlockUtils.getBlock(mc.theWorld, coords[0], coords[1], coords[2]) instanceof IExplosive) {
        mod_SecurityCraft.network.sendToServer(new PacketSetExplosiveState(coords[0], coords[1], coords[2], "activate"));
    }
    this.updateButton(guibutton);
}
Also used : IExplosive(net.geforcemods.securitycraft.api.IExplosive) PacketSetExplosiveState(net.geforcemods.securitycraft.network.packets.PacketSetExplosiveState)

Example 2 with PacketSetExplosiveState

use of net.geforcemods.securitycraft.network.packets.PacketSetExplosiveState in project SecurityCraft by Geforce132.

the class GuiMRATDetonate method actionPerformed.

@Override
protected void actionPerformed(GuiButton guibutton) {
    int[] coords = this.item.getTagCompound().getIntArray("mine" + (guibutton.id + 1));
    if (BlockUtils.getBlock(Minecraft.getMinecraft().theWorld, coords[0], coords[1], coords[2]) instanceof IExplosive) {
        mod_SecurityCraft.network.sendToServer(new PacketSetExplosiveState(coords[0], coords[1], coords[2], "detonate"));
    }
    this.updateButton(guibutton);
    this.removeTagFromItemAndUpdate(item, coords[0], coords[1], coords[2], Minecraft.getMinecraft().thePlayer);
}
Also used : IExplosive(net.geforcemods.securitycraft.api.IExplosive) PacketSetExplosiveState(net.geforcemods.securitycraft.network.packets.PacketSetExplosiveState)

Example 3 with PacketSetExplosiveState

use of net.geforcemods.securitycraft.network.packets.PacketSetExplosiveState in project SecurityCraft by Geforce132.

the class GuiMRATDeactivate method actionPerformed.

@Override
protected void actionPerformed(GuiButton guibutton) {
    int[] coords = this.item.getTagCompound().getIntArray("mine" + (guibutton.id + 1));
    if (BlockUtils.getBlock(mc.theWorld, coords[0], coords[1], coords[2]) instanceof IExplosive) {
        mod_SecurityCraft.network.sendToServer(new PacketSetExplosiveState(coords[0], coords[1], coords[2], "defuse"));
    }
    this.updateButton(guibutton);
}
Also used : IExplosive(net.geforcemods.securitycraft.api.IExplosive) PacketSetExplosiveState(net.geforcemods.securitycraft.network.packets.PacketSetExplosiveState)

Aggregations

IExplosive (net.geforcemods.securitycraft.api.IExplosive)3 PacketSetExplosiveState (net.geforcemods.securitycraft.network.packets.PacketSetExplosiveState)3