use of blusunrize.immersiveengineering.common.util.network.MessageTileSync in project ImmersiveEngineering by BluSunrize.
the class GuiFluidSorter method actionPerformed.
@Override
protected void actionPerformed(GuiButton button) {
if (button instanceof ButtonSorter && FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) {
int side = button.id;
this.tile.sortWithNBT[side] = (byte) (this.tile.sortWithNBT[side] == 1 ? 0 : 1);
NBTTagCompound tag = new NBTTagCompound();
tag.setByteArray("sideConfig", this.tile.sortWithNBT);
ImmersiveEngineering.packetHandler.sendToServer(new MessageTileSync(tile, tag));
this.initGui();
}
}
use of blusunrize.immersiveengineering.common.util.network.MessageTileSync in project ImmersiveEngineering by BluSunrize.
the class GuiTurret method keyTyped.
@Override
protected void keyTyped(char typedChar, int keyCode) throws IOException {
if (this.nameField.isFocused() && keyCode == 28) {
String name = this.nameField.getText();
if (!tile.targetList.contains(name)) {
NBTTagCompound tag = new NBTTagCompound();
tag.setString("add", name);
tile.targetList.add(name);
ImmersiveEngineering.packetHandler.sendToServer(new MessageTileSync(tile, tag));
this.initGui();
((GuiReactiveList) this.buttonList.get(0)).setOffset(((GuiReactiveList) this.buttonList.get(0)).getMaxOffset());
}
} else if (!this.nameField.textboxKeyTyped(typedChar, keyCode))
super.keyTyped(typedChar, keyCode);
}
use of blusunrize.immersiveengineering.common.util.network.MessageTileSync in project ImmersiveEngineering by BluSunrize.
the class TileEntityTurretGun method sendRenderPacket.
protected void sendRenderPacket() {
NBTTagCompound tag = new NBTTagCompound();
tag.setBoolean("cycle", true);
ImmersiveEngineering.packetHandler.sendToAll(new MessageTileSync(this, tag));
}
Aggregations