Squid entity

This commit is contained in:
Justin Aquadro 2011-04-30 05:59:58 +00:00
parent 77438fa1bf
commit fe0e71694e
2 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Substrate.Entities
{
using Substrate.NBT;
public class EntitySquid : EntityMob
{
public static readonly NBTCompoundNode SquidSchema = MobSchema.MergeInto(new NBTCompoundNode("")
{
new NBTStringNode("id", "Squid"),
});
public EntitySquid ()
: base("Squid")
{
}
public EntitySquid (Entity e)
: base(e)
{
}
#region INBTObject<Entity> Members
public override bool ValidateTree (TagValue tree)
{
return new NBTVerifier(tree, SquidSchema).Verify();
}
#endregion
#region ICopyable<Entity> Members
public override Entity Copy ()
{
return new EntitySquid(this);
}
#endregion
}
}

View file

@ -79,6 +79,7 @@ namespace Substrate
_registry["Slime"] = typeof(EntitySlime);
_registry["Snowball"] = typeof(EntitySnowball);
_registry["Spider"] = typeof(EntitySpider);
_registry["Squid"] = typeof(EntitySquid);
_registry["Wolf"] = typeof(EntityWolf);
_registry["Zombie"] = typeof(EntityZombie);
}