use of com.builtbroken.mc.core.network.packet.PacketTile in project ICBM-Classic by BuiltBrokenModding.
the class GuiEMPTower method keyTyped.
/** Call this method from you GuiScreen to process the keys into textbox. */
@Override
public void keyTyped(char par1, int par2) {
super.keyTyped(par1, par2);
this.textFieldBanJing.textboxKeyTyped(par1, par2);
try {
int radius = Math.min(Math.max(Integer.parseInt(this.textFieldBanJing.getText()), 10), TileEMPTower.MAX_RADIUS);
this.tileEntity.empRadius = radius;
Engine.instance.packetHandler.sendToServer(new PacketTile(this.tileEntity, 1, this.tileEntity.empRadius));
} catch (NumberFormatException e) {
}
}
use of com.builtbroken.mc.core.network.packet.PacketTile in project Engine by VoltzEngine-Project.
the class AbstractTileTest method testSendPacketToGuiUsers.
@Test
public void testSendPacketToGuiUsers() {
FakeWorld world = FakeWorld.newWorld("TestSendpacketToGuiUsers");
world.setBlock(0, 0, 0, block);
Tile tile = ((Tile) world.getTileEntity(0, 0, 0));
tile.sendPacketToGuiUsers(new PacketTile(tile));
}
Aggregations