forked from mirrors/NBTExplorer
64 lines
1.4 KiB
C#
64 lines
1.4 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Text;
|
|||
|
|
|||
|
namespace Substrate.Entities
|
|||
|
{
|
|||
|
using Substrate.Nbt;
|
|||
|
|
|||
|
public class EntitySilverfish : EntityMob
|
|||
|
{
|
|||
|
public static readonly SchemaNodeCompound SilverfishSchema = MobSchema.MergeInto(new SchemaNodeCompound("")
|
|||
|
{
|
|||
|
new SchemaNodeString("id", "Silverfish"),
|
|||
|
});
|
|||
|
|
|||
|
public EntitySilverfish ()
|
|||
|
: base("Silverfish")
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
public EntitySilverfish (TypedEntity e)
|
|||
|
: base(e)
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
#region INBTObject<Entity> Members
|
|||
|
|
|||
|
public override TypedEntity LoadTree (TagNode tree)
|
|||
|
{
|
|||
|
TagNodeCompound ctree = tree as TagNodeCompound;
|
|||
|
if (ctree == null || base.LoadTree(tree) == null) {
|
|||
|
return null;
|
|||
|
}
|
|||
|
|
|||
|
return this;
|
|||
|
}
|
|||
|
|
|||
|
public override TagNode BuildTree ()
|
|||
|
{
|
|||
|
TagNodeCompound tree = base.BuildTree() as TagNodeCompound;
|
|||
|
|
|||
|
return tree;
|
|||
|
}
|
|||
|
|
|||
|
public override bool ValidateTree (TagNode tree)
|
|||
|
{
|
|||
|
return new NbtVerifier(tree, SilverfishSchema).Verify();
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
#region ICopyable<Entity> Members
|
|||
|
|
|||
|
public override TypedEntity Copy ()
|
|||
|
{
|
|||
|
return new EntitySilverfish(this);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|