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);
}
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);
}
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);
}
Aggregations