diff --git a/Substrate/SubstrateCS/Source/Entities/EntitySquid.cs b/Substrate/SubstrateCS/Source/Entities/EntitySquid.cs new file mode 100644 index 0000000..ea7d6cb --- /dev/null +++ b/Substrate/SubstrateCS/Source/Entities/EntitySquid.cs @@ -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 Members + + public override bool ValidateTree (TagValue tree) + { + return new NBTVerifier(tree, SquidSchema).Verify(); + } + + #endregion + + + #region ICopyable Members + + public override Entity Copy () + { + return new EntitySquid(this); + } + + #endregion + } +} diff --git a/Substrate/SubstrateCS/Source/EntityFactory.cs b/Substrate/SubstrateCS/Source/EntityFactory.cs index 0ed3417..279da64 100644 --- a/Substrate/SubstrateCS/Source/EntityFactory.cs +++ b/Substrate/SubstrateCS/Source/EntityFactory.cs @@ -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); }