/// <summary> /// Writes the specified tag to the given DataOutput, writing the type byte, the UTF string key and then calling the /// tag to write its data. /// </summary> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public static void writeNamedTag(NBTBase par0NBTBase, DataOutput par1DataOutput) throws IOException public static void WriteNamedTag(NBTBase par0NBTBase, BinaryWriter par1DataOutput) { par1DataOutput.Write(par0NBTBase.GetId()); if (par0NBTBase.GetId() == 0) { return; } else { par1DataOutput.Write(par0NBTBase.GetName()); par0NBTBase.Write(par1DataOutput); return; } }
public virtual bool Equals(object par1Obj) { if (par1Obj == null || !(par1Obj is NBTBase)) { return(false); } NBTBase nbtbase = (NBTBase)par1Obj; if (GetId() != nbtbase.GetId()) { return(false); } if (Name == null && nbtbase.Name != null || Name != null && nbtbase.Name == null) { return(false); } return(Name == null || Name.Equals(nbtbase.Name)); }
/// <summary> /// Adds the provided tag to the end of the list. There is no check to veriy this tag is of the same type as any /// previous tag. /// </summary> public virtual void AppendTag(NBTBase par1NBTBase) { TagType = par1NBTBase.GetId(); TagList.Add(par1NBTBase); }