forked from mirrors/NBTExplorer
Squid entity
This commit is contained in:
parent
77438fa1bf
commit
fe0e71694e
2 changed files with 47 additions and 0 deletions
46
Substrate/SubstrateCS/Source/Entities/EntitySquid.cs
Normal file
46
Substrate/SubstrateCS/Source/Entities/EntitySquid.cs
Normal 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
|
||||||
|
}
|
||||||
|
}
|
|
@ -79,6 +79,7 @@ namespace Substrate
|
||||||
_registry["Slime"] = typeof(EntitySlime);
|
_registry["Slime"] = typeof(EntitySlime);
|
||||||
_registry["Snowball"] = typeof(EntitySnowball);
|
_registry["Snowball"] = typeof(EntitySnowball);
|
||||||
_registry["Spider"] = typeof(EntitySpider);
|
_registry["Spider"] = typeof(EntitySpider);
|
||||||
|
_registry["Squid"] = typeof(EntitySquid);
|
||||||
_registry["Wolf"] = typeof(EntityWolf);
|
_registry["Wolf"] = typeof(EntityWolf);
|
||||||
_registry["Zombie"] = typeof(EntityZombie);
|
_registry["Zombie"] = typeof(EntityZombie);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue