Examples of readFromNBT()


Examples of net.minecraft.tileentity.TileEntity.readFromNBT()

            NBTTagCompound nbt = new NBTTagCompound();
            blockTE.writeToNBT(nbt);
            nbt.removeTag("x");
            nbt.removeTag("y");
            nbt.removeTag("z");
            blockTE.readFromNBT(nbt);
            card.setMemoryCardContents(currentItem, getUnlocalizedName() + ".name", nbt);
            player.sendChatToPlayer(new ChatMessageComponent().addText(StatCollector.translateToLocal("ChatMsg.SettingsSaved")));
            return true;
          } else if (card.getSettingsName(currentItem).equals(getUnlocalizedName() + ".name") || card.getSettingsName(currentItem).equals("AppEng.GuiITooltip.Blank"))
          {
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity.readFromNBT()

            card.setMemoryCardContents(currentItem, getUnlocalizedName() + ".name", nbt);
            player.sendChatToPlayer(new ChatMessageComponent().addText(StatCollector.translateToLocal("ChatMsg.SettingsSaved")));
            return true;
          } else if (card.getSettingsName(currentItem).equals(getUnlocalizedName() + ".name") || card.getSettingsName(currentItem).equals("AppEng.GuiITooltip.Blank"))
          {
            blockTE.readFromNBT(card.getData(currentItem));
            Packet description = blockTE.getDescriptionPacket();
            if (description != null)
              PacketDispatcher.sendPacketToAllPlayers(description);
            player.sendChatToPlayer(new ChatMessageComponent().addText(StatCollector.translateToLocal("ChatMsg.SettingsLoaded")));
            return true;
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity.readFromNBT()

            NBTTagCompound nbt = new NBTTagCompound();
            blockTE.writeToNBT(nbt);
            nbt.removeTag("x");
            nbt.removeTag("y");
            nbt.removeTag("z");
            blockTE.readFromNBT(nbt);
            card.setMemoryCardContents(currentItem, getUnlocalizedName() + ".name", nbt);
            player.sendChatToPlayer(new ChatMessageComponent().addText(StatCollector.translateToLocal("ChatMsg.SettingsSaved")));
            return true;
          } else if (card.getSettingsName(currentItem).equals(getUnlocalizedName() + ".name") || card.getSettingsName(currentItem).equals("AppEng.GuiITooltip.Blank"))
          {
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity.readFromNBT()

            card.setMemoryCardContents(currentItem, getUnlocalizedName() + ".name", nbt);
            player.sendChatToPlayer(new ChatMessageComponent().addText(StatCollector.translateToLocal("ChatMsg.SettingsSaved")));
            return true;
          } else if (card.getSettingsName(currentItem).equals(getUnlocalizedName() + ".name") || card.getSettingsName(currentItem).equals("AppEng.GuiITooltip.Blank"))
          {
            blockTE.readFromNBT(card.getData(currentItem));
            Packet description = blockTE.getDescriptionPacket();
            if (description != null)
              PacketDispatcher.sendPacketToAllPlayers(description);
            player.sendChatToPlayer(new ChatMessageComponent().addText(StatCollector.translateToLocal("ChatMsg.SettingsLoaded")));
            return true;
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity.readFromNBT()

            NBTTagCompound nbt = new NBTTagCompound();
            blockTE.writeToNBT(nbt);
            nbt.removeTag("x");
            nbt.removeTag("y");
            nbt.removeTag("z");
            blockTE.readFromNBT(nbt);
            card.setMemoryCardContents(currentItem, getUnlocalizedName() + ".name", nbt);
            player.sendChatToPlayer(new ChatMessageComponent().addText(StatCollector.translateToLocal("ChatMsg.SettingsSaved")));
            return true;
          } else if (card.getSettingsName(currentItem).equals(getUnlocalizedName() + ".name") || card.getSettingsName(currentItem).equals("AppEng.GuiITooltip.Blank"))
          {
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity.readFromNBT()

            card.setMemoryCardContents(currentItem, getUnlocalizedName() + ".name", nbt);
            player.sendChatToPlayer(new ChatMessageComponent().addText(StatCollector.translateToLocal("ChatMsg.SettingsSaved")));
            return true;
          } else if (card.getSettingsName(currentItem).equals(getUnlocalizedName() + ".name") || card.getSettingsName(currentItem).equals("AppEng.GuiITooltip.Blank"))
          {
            blockTE.readFromNBT(card.getData(currentItem));
            Packet description = blockTE.getDescriptionPacket();
            if (description != null)
              PacketDispatcher.sendPacketToAllPlayers(description);
            player.sendChatToPlayer(new ChatMessageComponent().addText(StatCollector.translateToLocal("ChatMsg.SettingsLoaded")));
            return true;
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity.readFromNBT()

    TileEntity te = world.getTileEntity(x, y, z);
    if(te == null) {
      Log.warn("PacketUtil.handleTileEntityPacket: TileEntity null when processing tile entity packet.");
      return null;
    }
    te.readFromNBT(tags);
    return te;
  }
}
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity.readFromNBT()

      if(stack.hasTagCompound())
      {
        stack.getTagCompound().setInteger("x", x);
        stack.getTagCompound().setInteger("y", y);
        stack.getTagCompound().setInteger("z", z);
        te.readFromNBT(stack.getTagCompound());
      }
    }
  }
 
  @Override
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity.readFromNBT()

      TileEntity te = world.getBlockTileEntity(x, y, z);
      NBTTagCompound tag = stack.getTagCompound();
      tag.setInteger("x", x);
      tag.setInteger("y", y);
      tag.setInteger("z", z);
      te.readFromNBT(tag);
      PacketDispatcher.sendPacketToAllAround(x, y, z, 50, player.worldObj.provider.dimensionId, te.getDescriptionPacket());
    }
    return true;
  }
 
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity.readFromNBT()

    if(stack.getTagCompound() != null)
    {
      stack.getTagCompound().setInteger("x", x);
      stack.getTagCompound().setInteger("y", y);
      stack.getTagCompound().setInteger("z", z);
      te.readFromNBT(stack.getTagCompound());
    }
   
    if(te instanceof TileEntityFactory && ((TileEntityFactory)te).canRotate())
    {
      int facing = MathHelper.floor_double((entity.rotationYaw * 4F) / 360F + 0.5D) & 3;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.