コード例 #1
0
 public void sendInventoryToClients() {
   NBTTagCompound nbt = new NBTTagCompound();
   this.writeToNBT(nbt);
   PacketManager.sendPacketToClients(
       PacketManager.getPacket(
           ModularForceFieldSystem.CHANNEL, this, TilePacketType.INVENTORY.ordinal(), nbt));
 }
コード例 #2
0
  @Override
  protected void actionPerformed(GuiButton guiButton) {
    super.actionPerformed(guiButton);

    if (guiButton.id == 1) {
      PacketDispatcher.sendPacketToServer(
          PacketManager.getPacket(
              ZhuYao.CHANNEL, this.tileEntity, TPacketType.TOGGLE_MODE.ordinal()));
    }
  }
コード例 #3
0
 @Override
 public Packet getDescriptionPacket() {
   if (this.mainBlockPosition != null) {
     return PacketManager.getPacket(
         "BasicComponents",
         this,
         this.mainBlockPosition.x,
         this.mainBlockPosition.y,
         this.mainBlockPosition.z);
   }
   return null;
 }