Package net.minecraft.nbt

Examples of net.minecraft.nbt.NBTTagCompound.removeTag()


      tag = tags[i];
      if (!compound.hasKey(tag)) return;
      if (i == tags.length - 1) break;
      compound = compound.getCompoundTag(tag);
    }
    compound.removeTag(tag);
  }
 
  // Stack copying
 
  /** Creates a copy of an item stack with a specific stack size. <br>
View Full Code Here


        tag.setTag( "display", display );

        if ( name.length() > 0 )
          display.setString( "Name", name );
        else
          display.removeTag( "Name" );

        return new InscriberRecipe( new ItemStack[] { startingItem }, PlateA, PlateB, renamedItem, false );
      }
    }
View Full Code Here

  @Override
  public void removePermission(ItemStack itemStack, SecurityPermissions permission)
  {
    NBTTagCompound tag = Platform.openNbtData( itemStack );
    if ( tag.hasKey( permission.name() ) )
      tag.removeTag( permission.name() );
  }

  @Override
  public void addPermission(ItemStack itemStack, SecurityPermissions permission)
  {
View Full Code Here

  public void setColor(ItemStack is, ItemStack newColor)
  {
    NBTTagCompound data = Platform.openNbtData( is );
    if ( newColor == null )
      data.removeTag( "color" );
    else
    {
      NBTTagCompound color = new NBTTagCompound();
      newColor.writeToNBT( color );
      data.setTag( "color", color );
View Full Code Here

            {
                NBTTagCompound displayTagCompound = nbtTagCompound.getCompoundTag(Names.NBT.DISPLAY);

                if (displayTagCompound.hasKey(Names.NBT.COLOR))
                {
                    displayTagCompound.removeTag(Names.NBT.COLOR);
                }
            }
        }
    }
}
View Full Code Here

        // create copies so we don't modify the original
        curTags = (NBTTagCompound) curTags.copy();
        prevTags = (NBTTagCompound) prevTags.copy();

        curTags.removeTag("Energy");
        prevTags.removeTag("Energy");
        curTags.getCompoundTag("InfiTool").removeTag("Damage");
        prevTags.getCompoundTag("InfiTool").removeTag("Damage");

        return curTags.equals(prevTags);
    }
View Full Code Here

        for (int i = 0; i < 8; ++i) {
          if (gateNBT.hasKey("triggerParameters[" + i + "]")) {
            NBTTagCompound parameterNBT = gateNBT.getCompoundTag("triggerParameters[" + i + "]");

            if (parameterNBT.hasKey("stack")) {
              parameterNBT.removeTag("stack");
            }
          }
        }
      }
    }
View Full Code Here

          if (tile2 instanceof TileArchitect
              || tile2 instanceof TileConstructionMarker
              || tile2 instanceof TileBuilder) {
            architect.addSubBlueprint(tile2);

            nbt.removeTag("x");
            nbt.removeTag("y");
            nbt.removeTag("z");
          }
        }
View Full Code Here

              || tile2 instanceof TileConstructionMarker
              || tile2 instanceof TileBuilder) {
            architect.addSubBlueprint(tile2);

            nbt.removeTag("x");
            nbt.removeTag("y");
            nbt.removeTag("z");
          }
        }

        return;
View Full Code Here

              || tile2 instanceof TileBuilder) {
            architect.addSubBlueprint(tile2);

            nbt.removeTag("x");
            nbt.removeTag("y");
            nbt.removeTag("z");
          }
        }

        return;
      }
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.