Examples of writeToNBT()


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

        if (card.isMemoryCard(currentItem))
        {
          if (player.isSneaking())
          {
            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);
View Full Code Here

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

        if (card.isMemoryCard(currentItem))
        {
          if (player.isSneaking())
          {
            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);
View Full Code Here

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

          NBTTagCompound tileData = new NBTTagCompound();

          if (tileEntity != null)
          {
            tileEntity.writeToNBT(tileData);
          }

          this.handler.queueEvent(new BlockPostMoveDelayedEvent(this.handler, 0, this.world, this.position, this.newPosition, blockID, blockMetadata, tileEntity, tileData));
        }
      }
View Full Code Here

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

    if(te instanceof TileEntityRedNetLogic)
    {
      if(itemstack.getTagCompound() == null)
      {
        NBTTagCompound tag = new NBTTagCompound();
        te.writeToNBT(tag);
        itemstack.setTagCompound(tag);
        player.sendChatToPlayer("PRC program uploaded to memory card from PRC");
      }
      else
      {
View Full Code Here

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

      }
      else
      {
        TileEntity te = world.getBlockTileEntity(x, y, z);
        NBTTagCompound tag = new NBTTagCompound();
        te.writeToNBT(tag);
        itemstack.setTagCompound(tag);
        world.setBlockToAir(x, y, z);
        return true;
      }
    }
View Full Code Here

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

    if(getEntityId(itemstack) == null) {
      if(world.getBlock(x, y, z).equals(Blocks.mob_spawner)) {
        TileEntity te = world.getTileEntity(x, y, z);
        NBTTagCompound tag = new NBTTagCompound();
        tag.setTag(TAG_SPAWNER, new NBTTagCompound());
        te.writeToNBT(tag.getCompoundTag(TAG_SPAWNER));
        tag.setInteger(TAG_PLACE_DELAY, 20);
        itemstack.setTagCompound(tag);
        world.setBlockToAir(x, y, z);
        player.renderBrokenItemStack(itemstack);
        for(int i = 0; i < 50; i++) {
View Full Code Here

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

        if(world.getTileEntity(x, y, z) != null)
        {
          TileEntity tile = world.getTileEntity(x, y, z);
          NBTTagCompound tag = new NBTTagCompound();

          tile.writeToNBT(tag);
          data.tileTag = tag;
        }

        if(!player.capabilities.isCreativeMode)
        {
View Full Code Here

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

        if (tileEntity == null)
        {
            return null;
        }
        NBTTagCompound nmsTag = new NBTTagCompound();
        tileEntity.writeToNBT(nmsTag);
        nmsTag.removeTag("x");
        nmsTag.removeTag("y");
        nmsTag.removeTag("z");
        return NBTHelper.getNBTFromNMSTagCompound(null, nmsTag);
    }
View Full Code Here

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

    if (block.hasTileEntity(meta)) {
      TileEntity tile = context.world().getTileEntity(x, y, z);

      if (tile != null) {
        tile.writeToNBT(tileNBT);
      }
    }
  }

  @Override
View Full Code Here

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

        if (entity != null)
        {
            try
            {
                NBTTagCompound compound = new NBTTagCompound();
                entity.writeToNBT(compound);
                tile = compound;
            }
            catch (Exception e)
            {
            }
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.