From 5997c362fd99e1ae35e247e9bb5e18f454e8b35d Mon Sep 17 00:00:00 2001 From: Justin Aquadro Date: Sat, 5 Nov 2011 14:17:57 -0400 Subject: [PATCH] Factored out entity type strings into single TypeId property. Found a couple bugs along the way and should prevent future bugs of this type. --- SubstrateCS/Source/Entities/EntityArrow.cs | 15 ++-- SubstrateCS/Source/Entities/EntityBlaze.cs | 11 ++- SubstrateCS/Source/Entities/EntityBoat.cs | 11 ++- .../Source/Entities/EntityCaveSpider.cs | 12 ++- SubstrateCS/Source/Entities/EntityChicken.cs | 11 ++- SubstrateCS/Source/Entities/EntityCow.cs | 11 ++- SubstrateCS/Source/Entities/EntityCreeper.cs | 15 ++-- SubstrateCS/Source/Entities/EntityEgg.cs | 11 ++- .../Source/Entities/EntityEnderDragon.cs | 11 ++- SubstrateCS/Source/Entities/EntityEnderEye.cs | 11 ++- .../Source/Entities/EntityEnderPearl.cs | 11 ++- SubstrateCS/Source/Entities/EntityEnderman.cs | 15 ++-- .../Source/Entities/EntityFallingSand.cs | 15 ++-- SubstrateCS/Source/Entities/EntityFireball.cs | 15 ++-- SubstrateCS/Source/Entities/EntityGhast.cs | 11 ++- SubstrateCS/Source/Entities/EntityGiant.cs | 11 ++- SubstrateCS/Source/Entities/EntityItem.cs | 15 ++-- .../Source/Entities/EntityMagmaCube.cs | 11 ++- SubstrateCS/Source/Entities/EntityMinecart.cs | 15 ++-- .../Source/Entities/EntityMinecartChest.cs | 16 ++-- .../Source/Entities/EntityMinecartFurnace.cs | 13 +++- SubstrateCS/Source/Entities/EntityMob.cs | 15 ++-- SubstrateCS/Source/Entities/EntityMonster.cs | 11 ++- .../Source/Entities/EntityMooshroom.cs | 11 ++- SubstrateCS/Source/Entities/EntityPainting.cs | 15 ++-- SubstrateCS/Source/Entities/EntityPig.cs | 15 ++-- .../Source/Entities/EntityPigZombie.cs | 15 ++-- .../Source/Entities/EntityPrimedTnt.cs | 15 ++-- SubstrateCS/Source/Entities/EntitySheep.cs | 15 ++-- .../Source/Entities/EntitySilverfish.cs | 11 ++- SubstrateCS/Source/Entities/EntitySkeleton.cs | 11 ++- SubstrateCS/Source/Entities/EntitySlime.cs | 15 ++-- .../Source/Entities/EntitySmallFireball.cs | 11 ++- SubstrateCS/Source/Entities/EntitySnowball.cs | 11 ++- SubstrateCS/Source/Entities/EntitySnowman.cs | 11 ++- SubstrateCS/Source/Entities/EntitySpider.cs | 11 ++- SubstrateCS/Source/Entities/EntitySquid.cs | 11 ++- .../Source/Entities/EntityThrowable.cs | 5 -- SubstrateCS/Source/Entities/EntityVillager.cs | 15 ++-- SubstrateCS/Source/Entities/EntityWolf.cs | 15 ++-- SubstrateCS/Source/Entities/EntityXPOrb.cs | 14 +++- SubstrateCS/Source/Entities/EntityZombie.cs | 11 ++- SubstrateCS/Source/EntityFactory.cs | 78 +++++++++---------- 43 files changed, 405 insertions(+), 204 deletions(-) diff --git a/SubstrateCS/Source/Entities/EntityArrow.cs b/SubstrateCS/Source/Entities/EntityArrow.cs index 073d455..4706318 100644 --- a/SubstrateCS/Source/Entities/EntityArrow.cs +++ b/SubstrateCS/Source/Entities/EntityArrow.cs @@ -10,11 +10,16 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound ArrowSchema = ThrowableSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Arrow"), + new SchemaNodeString("id", TypeId), new SchemaNodeScaler("inData", TagType.TAG_BYTE, SchemaOptions.CREATE_ON_MISSING), new SchemaNodeScaler("player", TagType.TAG_BYTE, SchemaOptions.CREATE_ON_MISSING), }); + public static string TypeId + { + get { return "Arrow"; } + } + private byte _inData; private byte _player; @@ -30,13 +35,13 @@ namespace Substrate.Entities set { _player = (byte)(value ? 1 : 0); } } - public EntityArrow () - : base("Arrow") + protected EntityArrow (string id) + : base(id) { } - protected EntityArrow (string id) - : base(id) + public EntityArrow () + : this(TypeId) { } diff --git a/SubstrateCS/Source/Entities/EntityBlaze.cs b/SubstrateCS/Source/Entities/EntityBlaze.cs index 12898f7..d5e2294 100644 --- a/SubstrateCS/Source/Entities/EntityBlaze.cs +++ b/SubstrateCS/Source/Entities/EntityBlaze.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound BlazeSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Blaze"), + new SchemaNodeString("id", TypeId), }); - public EntityBlaze () - : base("Blaze") + public static string TypeId { + get { return "Blaze"; } } protected EntityBlaze (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntityBlaze () + : this(TypeId) + { + } + public EntityBlaze (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntityBoat.cs b/SubstrateCS/Source/Entities/EntityBoat.cs index 6bb2bce..504ccf4 100644 --- a/SubstrateCS/Source/Entities/EntityBoat.cs +++ b/SubstrateCS/Source/Entities/EntityBoat.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound BoatSchema = TypedEntity.Schema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Boat"), + new SchemaNodeString("id", TypeId), }); - public EntityBoat () - : base("Boat") + public static string TypeId { + get { return "Boat"; } } protected EntityBoat (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntityBoat () + : this(TypeId) + { + } + public EntityBoat (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntityCaveSpider.cs b/SubstrateCS/Source/Entities/EntityCaveSpider.cs index eb47caa..e856dd6 100644 --- a/SubstrateCS/Source/Entities/EntityCaveSpider.cs +++ b/SubstrateCS/Source/Entities/EntityCaveSpider.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound CaveSpiderSchema = SpiderSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "CaveSpider"), + new SchemaNodeString("id", TypeId), }); - public EntityCaveSpider () - : base("CaveSpider") + public static string TypeId { + get { return "CaveSpider"; } } protected EntityCaveSpider (string id) @@ -23,12 +23,16 @@ namespace Substrate.Entities { } + public EntityCaveSpider () + : this(TypeId) + { + } + public EntityCaveSpider (TypedEntity e) : base(e) { } - #region INBTObject Members public override bool ValidateTree (TagNode tree) diff --git a/SubstrateCS/Source/Entities/EntityChicken.cs b/SubstrateCS/Source/Entities/EntityChicken.cs index eb01ece..6465f2d 100644 --- a/SubstrateCS/Source/Entities/EntityChicken.cs +++ b/SubstrateCS/Source/Entities/EntityChicken.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound ChickenSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Chicken"), + new SchemaNodeString("id", TypeId), }); - public EntityChicken () - : base("Chicken") + public static string TypeId { + get { return "Chicken"; } } protected EntityChicken (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntityChicken () + : this(TypeId) + { + } + public EntityChicken (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntityCow.cs b/SubstrateCS/Source/Entities/EntityCow.cs index 9d46d90..0c2b37e 100644 --- a/SubstrateCS/Source/Entities/EntityCow.cs +++ b/SubstrateCS/Source/Entities/EntityCow.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound CowSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Cow"), + new SchemaNodeString("id", TypeId), }); - public EntityCow () - : base("Cow") + public static string TypeId { + get { return "Cow"; } } protected EntityCow (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntityCow () + : this(TypeId) + { + } + public EntityCow (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntityCreeper.cs b/SubstrateCS/Source/Entities/EntityCreeper.cs index 9f3158b..bf80075 100644 --- a/SubstrateCS/Source/Entities/EntityCreeper.cs +++ b/SubstrateCS/Source/Entities/EntityCreeper.cs @@ -10,10 +10,15 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound CreeperSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Creeper"), + new SchemaNodeString("id", TypeId), new SchemaNodeScaler("powered", TagType.TAG_BYTE, SchemaOptions.OPTIONAL), }); + public static string TypeId + { + get { return "Creeper"; } + } + private bool? _powered; public bool Powered @@ -22,13 +27,13 @@ namespace Substrate.Entities set { _powered = value; } } - public EntityCreeper () - : base("Creeper") + protected EntityCreeper (string id) + : base(id) { } - protected EntityCreeper (string id) - : base(id) + public EntityCreeper () + : this(TypeId) { } diff --git a/SubstrateCS/Source/Entities/EntityEgg.cs b/SubstrateCS/Source/Entities/EntityEgg.cs index 4093350..fbca859 100644 --- a/SubstrateCS/Source/Entities/EntityEgg.cs +++ b/SubstrateCS/Source/Entities/EntityEgg.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound EggSchema = ThrowableSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Egg"), + new SchemaNodeString("id", TypeId), }); - public EntityEgg () - : base("Egg") + public static string TypeId { + get { return "Egg"; } } protected EntityEgg (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntityEgg () + : this(TypeId) + { + } + public EntityEgg (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntityEnderDragon.cs b/SubstrateCS/Source/Entities/EntityEnderDragon.cs index 654b1b3..24dcd9b 100644 --- a/SubstrateCS/Source/Entities/EntityEnderDragon.cs +++ b/SubstrateCS/Source/Entities/EntityEnderDragon.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound EnderDragonSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "EnderDragon"), + new SchemaNodeString("id", TypeId), }); - public EntityEnderDragon () - : base("EnderDragon") + public static string TypeId { + get { return "EnderDragon"; } } protected EntityEnderDragon (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntityEnderDragon () + : this(TypeId) + { + } + public EntityEnderDragon (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntityEnderEye.cs b/SubstrateCS/Source/Entities/EntityEnderEye.cs index b9c3932..e7572d8 100644 --- a/SubstrateCS/Source/Entities/EntityEnderEye.cs +++ b/SubstrateCS/Source/Entities/EntityEnderEye.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound EnderEyeSchema = TypedEntity.Schema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "EyeOfEnderSignal"), + new SchemaNodeString("id", TypeId), }); - public EntityEnderEye () - : base("EyeOfEnderSignal") + public static string TypeId { + get { return "EyeOfEnderSignal"; } } protected EntityEnderEye (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntityEnderEye () + : this(TypeId) + { + } + public EntityEnderEye (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntityEnderPearl.cs b/SubstrateCS/Source/Entities/EntityEnderPearl.cs index 24b61bd..8be41f1 100644 --- a/SubstrateCS/Source/Entities/EntityEnderPearl.cs +++ b/SubstrateCS/Source/Entities/EntityEnderPearl.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound EnderPearlSchema = ThrowableSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "ThrownEnderpearl"), + new SchemaNodeString("id", TypeId), }); - public EntityEnderPearl () - : base("ThrownEnderpearl") + public static string TypeId { + get { return "ThrownEnderpearl"; } } protected EntityEnderPearl (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntityEnderPearl () + : this(TypeId) + { + } + public EntityEnderPearl (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntityEnderman.cs b/SubstrateCS/Source/Entities/EntityEnderman.cs index 6fba4fc..c4becae 100644 --- a/SubstrateCS/Source/Entities/EntityEnderman.cs +++ b/SubstrateCS/Source/Entities/EntityEnderman.cs @@ -14,11 +14,16 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound EndermanSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Enderman"), + new SchemaNodeString("id", TypeId), new SchemaNodeScaler("carried", TagType.TAG_SHORT, SchemaOptions.CREATE_ON_MISSING), new SchemaNodeScaler("carriedData", TagType.TAG_SHORT, SchemaOptions.CREATE_ON_MISSING), }); + public static string TypeId + { + get { return "Enderman"; } + } + private short _carried; private short _carryingData; @@ -34,13 +39,13 @@ namespace Substrate.Entities set { _carryingData = (short)value; } } - public EntityEnderman () - : base("Enderman") + protected EntityEnderman (string id) + : base(id) { } - protected EntityEnderman (string id) - : base(id) + public EntityEnderman () + : this(TypeId) { } diff --git a/SubstrateCS/Source/Entities/EntityFallingSand.cs b/SubstrateCS/Source/Entities/EntityFallingSand.cs index d6f01bc..1fae53e 100644 --- a/SubstrateCS/Source/Entities/EntityFallingSand.cs +++ b/SubstrateCS/Source/Entities/EntityFallingSand.cs @@ -10,10 +10,15 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound FallingSandSchema = TypedEntity.Schema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "FallingSand"), + new SchemaNodeString("id", TypeId), new SchemaNodeScaler("Tile", TagType.TAG_BYTE), }); + public static string TypeId + { + get { return "FallingSand"; } + } + private byte _tile; public int Tile @@ -22,13 +27,13 @@ namespace Substrate.Entities set { _tile = (byte)value; } } - public EntityFallingSand () - : base("FallingSand") + protected EntityFallingSand (string id) + : base(id) { } - protected EntityFallingSand (string id) - : base(id) + public EntityFallingSand () + : this(TypeId) { } diff --git a/SubstrateCS/Source/Entities/EntityFireball.cs b/SubstrateCS/Source/Entities/EntityFireball.cs index e36837d..fa28238 100644 --- a/SubstrateCS/Source/Entities/EntityFireball.cs +++ b/SubstrateCS/Source/Entities/EntityFireball.cs @@ -10,7 +10,7 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound FireballSchema = TypedEntity.Schema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Fireball"), + new SchemaNodeString("id", TypeId), new SchemaNodeScaler("xTile", TagType.TAG_SHORT), new SchemaNodeScaler("yTile", TagType.TAG_SHORT), new SchemaNodeScaler("zTile", TagType.TAG_SHORT), @@ -18,6 +18,11 @@ namespace Substrate.Entities new SchemaNodeScaler("inGround", TagType.TAG_BYTE), }); + public static string TypeId + { + get { return "Fireball"; } + } + private short _xTile; private short _yTile; private short _zTile; @@ -54,13 +59,13 @@ namespace Substrate.Entities set { _inGround = (byte)(value ? 1 : 0); } } - public EntityFireball () - : base("Fireball") + protected EntityFireball (string id) + : base(id) { } - protected EntityFireball (string id) - : base(id) + public EntityFireball () + : this(TypeId) { } diff --git a/SubstrateCS/Source/Entities/EntityGhast.cs b/SubstrateCS/Source/Entities/EntityGhast.cs index 7cd6b3e..ffb1e46 100644 --- a/SubstrateCS/Source/Entities/EntityGhast.cs +++ b/SubstrateCS/Source/Entities/EntityGhast.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound GhastSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Ghast"), + new SchemaNodeString("id", TypeId), }); - public EntityGhast () - : base("Ghast") + public static string TypeId { + get { return "Ghast"; } } protected EntityGhast (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntityGhast () + : this(TypeId) + { + } + public EntityGhast (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntityGiant.cs b/SubstrateCS/Source/Entities/EntityGiant.cs index 3aadd83..30729de 100644 --- a/SubstrateCS/Source/Entities/EntityGiant.cs +++ b/SubstrateCS/Source/Entities/EntityGiant.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound GiantSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Giant"), + new SchemaNodeString("id", TypeId), }); - public EntityGiant () - : base("Giant") + public static string TypeId { + get { return "Giant"; } } protected EntityGiant (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntityGiant () + : this(TypeId) + { + } + public EntityGiant (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntityItem.cs b/SubstrateCS/Source/Entities/EntityItem.cs index 38b8b25..a09cc59 100644 --- a/SubstrateCS/Source/Entities/EntityItem.cs +++ b/SubstrateCS/Source/Entities/EntityItem.cs @@ -10,12 +10,17 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound ItemSchema = TypedEntity.Schema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Item"), + new SchemaNodeString("id", TypeId), new SchemaNodeScaler("Health", TagType.TAG_SHORT), new SchemaNodeScaler("Age", TagType.TAG_SHORT), new SchemaNodeCompound("Item", Item.Schema), }); + public static string TypeId + { + get { return "Item"; } + } + private short _health; private short _age; @@ -39,13 +44,13 @@ namespace Substrate.Entities set { _item = value; } } - public EntityItem () - : base("Item") + protected EntityItem (string id) + : base(id) { } - protected EntityItem (string id) - : base(id) + public EntityItem () + : this(TypeId) { } diff --git a/SubstrateCS/Source/Entities/EntityMagmaCube.cs b/SubstrateCS/Source/Entities/EntityMagmaCube.cs index e84fed4..b794749 100644 --- a/SubstrateCS/Source/Entities/EntityMagmaCube.cs +++ b/SubstrateCS/Source/Entities/EntityMagmaCube.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound MagmaCubeSchema = SlimeSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "LavaSlime"), + new SchemaNodeString("id", TypeId), }); - public EntityMagmaCube () - : base("LavaSlime") + public static string TypeId { + get { return "LavaSlime"; } } protected EntityMagmaCube (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntityMagmaCube () + : this(TypeId) + { + } + public EntityMagmaCube (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntityMinecart.cs b/SubstrateCS/Source/Entities/EntityMinecart.cs index c3bee9d..0e5a9eb 100644 --- a/SubstrateCS/Source/Entities/EntityMinecart.cs +++ b/SubstrateCS/Source/Entities/EntityMinecart.cs @@ -17,10 +17,15 @@ namespace Substrate.Entities public static readonly SchemaNodeCompound MinecartSchema = TypedEntity.Schema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Minecart"), + new SchemaNodeString("id", TypeId), new SchemaNodeScaler("Type", TagType.TAG_INT), }); + public static string TypeId + { + get { return "Minecart"; } + } + private CartType _type; public CartType Type @@ -28,13 +33,13 @@ namespace Substrate.Entities get { return _type; } } - public EntityMinecart () - : base("Minecart") + protected EntityMinecart (string id) + : base(id) { } - protected EntityMinecart (string id) - : base(id) + public EntityMinecart () + : this(TypeId) { } diff --git a/SubstrateCS/Source/Entities/EntityMinecartChest.cs b/SubstrateCS/Source/Entities/EntityMinecartChest.cs index 83a19f3..7c8b8f0 100644 --- a/SubstrateCS/Source/Entities/EntityMinecartChest.cs +++ b/SubstrateCS/Source/Entities/EntityMinecartChest.cs @@ -12,21 +12,27 @@ namespace Substrate.Entities new SchemaNodeList("Items", TagType.TAG_COMPOUND, ItemCollection.Schema), }); + public static string TypeId + { + get { return EntityMinecart.TypeId; } + } + private static int _CAPACITY = 27; private ItemCollection _items; + protected EntityMinecartChest (string id) + : base(id) + { + _items = new ItemCollection(_CAPACITY); + } + public EntityMinecartChest () : base() { _items = new ItemCollection(_CAPACITY); } - protected EntityMinecartChest (string id) - : base(id) - { - } - public EntityMinecartChest (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntityMinecartFurnace.cs b/SubstrateCS/Source/Entities/EntityMinecartFurnace.cs index f2a2deb..015e574 100644 --- a/SubstrateCS/Source/Entities/EntityMinecartFurnace.cs +++ b/SubstrateCS/Source/Entities/EntityMinecartFurnace.cs @@ -15,6 +15,11 @@ namespace Substrate.Entities new SchemaNodeScaler("Fuel", TagType.TAG_SHORT), }); + public static string TypeId + { + get { return EntityMinecart.TypeId; } + } + private double _pushX; private double _pushZ; private short _fuel; @@ -37,13 +42,13 @@ namespace Substrate.Entities set { _fuel = (short)value; } } - public EntityMinecartFurnace () - : base() + protected EntityMinecartFurnace (string id) + : base(id) { } - protected EntityMinecartFurnace (string id) - : base(id) + public EntityMinecartFurnace () + : base() { } diff --git a/SubstrateCS/Source/Entities/EntityMob.cs b/SubstrateCS/Source/Entities/EntityMob.cs index f159834..36bdc36 100644 --- a/SubstrateCS/Source/Entities/EntityMob.cs +++ b/SubstrateCS/Source/Entities/EntityMob.cs @@ -38,7 +38,7 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound MobSchema = TypedEntity.Schema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Mob"), + new SchemaNodeString("id", TypeId), new SchemaNodeScaler("AttackTime", TagType.TAG_SHORT), new SchemaNodeScaler("DeathTime", TagType.TAG_SHORT), new SchemaNodeScaler("Health", TagType.TAG_SHORT), @@ -51,6 +51,11 @@ namespace Substrate.Entities }, }); + public static string TypeId + { + get { return "Mob"; } + } + private short _attackTime; private short _deathTime; private short _health; @@ -88,13 +93,13 @@ namespace Substrate.Entities set { _activeEffects = value; } } - public EntityMob () - : base("Mob") + protected EntityMob (string id) + : base(id) { } - protected EntityMob (string id) - : base(id) + public EntityMob () + : this(TypeId) { } diff --git a/SubstrateCS/Source/Entities/EntityMonster.cs b/SubstrateCS/Source/Entities/EntityMonster.cs index bbf9267..29733d9 100644 --- a/SubstrateCS/Source/Entities/EntityMonster.cs +++ b/SubstrateCS/Source/Entities/EntityMonster.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound MonsterSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Monster"), + new SchemaNodeString("id", TypeId), }); - public EntityMonster () - : base("Monster") + public static string TypeId { + get { return "Monster"; } } protected EntityMonster (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntityMonster () + : this(TypeId) + { + } + public EntityMonster (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntityMooshroom.cs b/SubstrateCS/Source/Entities/EntityMooshroom.cs index 032ccd8..bef556f 100644 --- a/SubstrateCS/Source/Entities/EntityMooshroom.cs +++ b/SubstrateCS/Source/Entities/EntityMooshroom.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound MooshroomSchema = CowSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "MushroomCow"), + new SchemaNodeString("id", TypeId), }); - public EntityMooshroom () - : base("MushroomCow") + public static string TypeId { + get { return "MushroomCow"; } } protected EntityMooshroom (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntityMooshroom () + : this(TypeId) + { + } + public EntityMooshroom (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntityPainting.cs b/SubstrateCS/Source/Entities/EntityPainting.cs index 58f75ee..a6818cf 100644 --- a/SubstrateCS/Source/Entities/EntityPainting.cs +++ b/SubstrateCS/Source/Entities/EntityPainting.cs @@ -18,7 +18,7 @@ namespace Substrate.Entities public static readonly SchemaNodeCompound PaintingSchema = TypedEntity.Schema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Painting"), + new SchemaNodeString("id", TypeId), new SchemaNodeScaler("Dir", TagType.TAG_BYTE), new SchemaNodeScaler("TileX", TagType.TAG_INT), new SchemaNodeScaler("TileY", TagType.TAG_INT), @@ -26,6 +26,11 @@ namespace Substrate.Entities new SchemaNodeScaler("Motive", TagType.TAG_STRING), }); + public static string TypeId + { + get { return "Painting"; } + } + private DirectionType _dir; private string _motive; private int _xTile; @@ -62,13 +67,13 @@ namespace Substrate.Entities set { _zTile = value; } } - public EntityPainting () - : base("Painting") + protected EntityPainting (string id) + : base(id) { } - protected EntityPainting (string id) - : base(id) + public EntityPainting () + : this(TypeId) { } diff --git a/SubstrateCS/Source/Entities/EntityPig.cs b/SubstrateCS/Source/Entities/EntityPig.cs index a123f7e..fdb062a 100644 --- a/SubstrateCS/Source/Entities/EntityPig.cs +++ b/SubstrateCS/Source/Entities/EntityPig.cs @@ -10,10 +10,15 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound PigSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Pig"), + new SchemaNodeString("id", TypeId), new SchemaNodeScaler("Saddle", TagType.TAG_BYTE), }); + public static string TypeId + { + get { return "Pig"; } + } + private bool _saddle; public bool HasSaddle @@ -22,13 +27,13 @@ namespace Substrate.Entities set { _saddle = value; } } - public EntityPig () - : base("Pig") + protected EntityPig (string id) + : base(id) { } - protected EntityPig (string id) - : base(id) + public EntityPig () + : this(TypeId) { } diff --git a/SubstrateCS/Source/Entities/EntityPigZombie.cs b/SubstrateCS/Source/Entities/EntityPigZombie.cs index bb1d678..a6f02a0 100644 --- a/SubstrateCS/Source/Entities/EntityPigZombie.cs +++ b/SubstrateCS/Source/Entities/EntityPigZombie.cs @@ -10,10 +10,15 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound PigZombieSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "PigZombie"), + new SchemaNodeString("id", TypeId), new SchemaNodeScaler("Anger", TagType.TAG_SHORT), }); + public static string TypeId + { + get { return "PigZombie"; } + } + private short _anger; public int Anger @@ -22,13 +27,13 @@ namespace Substrate.Entities set { _anger = (short)value; } } - public EntityPigZombie () - : base("PigZombie") + protected EntityPigZombie (string id) + : base(id) { } - protected EntityPigZombie (string id) - : base(id) + public EntityPigZombie () + : this(TypeId) { } diff --git a/SubstrateCS/Source/Entities/EntityPrimedTnt.cs b/SubstrateCS/Source/Entities/EntityPrimedTnt.cs index bb4a218..65a9444 100644 --- a/SubstrateCS/Source/Entities/EntityPrimedTnt.cs +++ b/SubstrateCS/Source/Entities/EntityPrimedTnt.cs @@ -10,10 +10,15 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound PrimedTntSchema = TypedEntity.Schema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "PrimedTnt"), + new SchemaNodeString("id", TypeId), new SchemaNodeScaler("Fuse", TagType.TAG_BYTE), }); + public static string TypeId + { + get { return "PrimedTnt"; } + } + private byte _fuse; public int Fuse @@ -22,13 +27,13 @@ namespace Substrate.Entities set { _fuse = (byte)value; } } - public EntityPrimedTnt () - : base("PrimedTnt") + protected EntityPrimedTnt (string id) + : base(id) { } - protected EntityPrimedTnt (string id) - : base(id) + public EntityPrimedTnt () + : this(TypeId) { } diff --git a/SubstrateCS/Source/Entities/EntitySheep.cs b/SubstrateCS/Source/Entities/EntitySheep.cs index 96dca6f..f042a04 100644 --- a/SubstrateCS/Source/Entities/EntitySheep.cs +++ b/SubstrateCS/Source/Entities/EntitySheep.cs @@ -10,11 +10,16 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound SheepSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Sheep"), + new SchemaNodeString("id", TypeId), new SchemaNodeScaler("Sheared", TagType.TAG_BYTE), new SchemaNodeScaler("Color", TagType.TAG_BYTE, SchemaOptions.CREATE_ON_MISSING), }); + public static string TypeId + { + get { return "Sheep"; } + } + private bool _sheared; private byte _color; @@ -30,13 +35,13 @@ namespace Substrate.Entities set { _color = (byte)value; } } - public EntitySheep () - : base("Sheep") + protected EntitySheep (string id) + : base(id) { } - protected EntitySheep (string id) - : base(id) + public EntitySheep () + : this(TypeId) { } diff --git a/SubstrateCS/Source/Entities/EntitySilverfish.cs b/SubstrateCS/Source/Entities/EntitySilverfish.cs index a80e062..149d9c4 100644 --- a/SubstrateCS/Source/Entities/EntitySilverfish.cs +++ b/SubstrateCS/Source/Entities/EntitySilverfish.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound SilverfishSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Silverfish"), + new SchemaNodeString("id", TypeId), }); - public EntitySilverfish () - : base("Silverfish") + public static string TypeId { + get { return "Silverfish"; } } protected EntitySilverfish (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntitySilverfish () + : this(TypeId) + { + } + public EntitySilverfish (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntitySkeleton.cs b/SubstrateCS/Source/Entities/EntitySkeleton.cs index e31d838..0600596 100644 --- a/SubstrateCS/Source/Entities/EntitySkeleton.cs +++ b/SubstrateCS/Source/Entities/EntitySkeleton.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound SkeletonSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Skeleton"), + new SchemaNodeString("id", TypeId), }); - public EntitySkeleton () - : base("Skeleton") + public static string TypeId { + get { return "Skeleton"; } } protected EntitySkeleton (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntitySkeleton () + : this(TypeId) + { + } + public EntitySkeleton (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntitySlime.cs b/SubstrateCS/Source/Entities/EntitySlime.cs index df4bc10..c5cf24d 100644 --- a/SubstrateCS/Source/Entities/EntitySlime.cs +++ b/SubstrateCS/Source/Entities/EntitySlime.cs @@ -10,10 +10,15 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound SlimeSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Slime"), + new SchemaNodeString("id", TypeId), new SchemaNodeScaler("Size", TagType.TAG_INT), }); + public static string TypeId + { + get { return "Slime"; } + } + private int _size; public int Size @@ -22,13 +27,13 @@ namespace Substrate.Entities set { _size = value; } } - public EntitySlime () - : base("Slime") + protected EntitySlime (string id) + : base(id) { } - protected EntitySlime (string id) - : base(id) + public EntitySlime () + : this(TypeId) { } diff --git a/SubstrateCS/Source/Entities/EntitySmallFireball.cs b/SubstrateCS/Source/Entities/EntitySmallFireball.cs index 240d395..d8b2dd7 100644 --- a/SubstrateCS/Source/Entities/EntitySmallFireball.cs +++ b/SubstrateCS/Source/Entities/EntitySmallFireball.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound SmallFireballSchema = FireballSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "SmallFireball"), + new SchemaNodeString("id", TypeId), }); - public EntitySmallFireball () - : base("SmallFireball") + public static string TypeId { + get { return "SmallFireball"; } } protected EntitySmallFireball (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntitySmallFireball () + : this(TypeId) + { + } + public EntitySmallFireball (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntitySnowball.cs b/SubstrateCS/Source/Entities/EntitySnowball.cs index b9ef950..40a91b9 100644 --- a/SubstrateCS/Source/Entities/EntitySnowball.cs +++ b/SubstrateCS/Source/Entities/EntitySnowball.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound SnowballSchema = ThrowableSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Snowball"), + new SchemaNodeString("id", TypeId), }); - public EntitySnowball () - : base("Snowball") + public static string TypeId { + get { return "Snowball"; } } protected EntitySnowball (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntitySnowball () + : this(TypeId) + { + } + public EntitySnowball (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntitySnowman.cs b/SubstrateCS/Source/Entities/EntitySnowman.cs index adc1d39..e9626ef 100644 --- a/SubstrateCS/Source/Entities/EntitySnowman.cs +++ b/SubstrateCS/Source/Entities/EntitySnowman.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound SnowmanSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "SnowMan"), + new SchemaNodeString("id", TypeId), }); - public EntitySnowman () - : base("SnowMan") + public static string TypeId { + get { return "SnowMan"; } } protected EntitySnowman (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntitySnowman () + : this(TypeId) + { + } + public EntitySnowman (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntitySpider.cs b/SubstrateCS/Source/Entities/EntitySpider.cs index af83919..5f82d78 100644 --- a/SubstrateCS/Source/Entities/EntitySpider.cs +++ b/SubstrateCS/Source/Entities/EntitySpider.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound SpiderSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Spider"), + new SchemaNodeString("id", TypeId), }); - public EntitySpider () - : base("Spider") + public static string TypeId { + get { return "Spider"; } } protected EntitySpider (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntitySpider () + : this(TypeId) + { + } + public EntitySpider (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntitySquid.cs b/SubstrateCS/Source/Entities/EntitySquid.cs index 2484c67..cdc4f2b 100644 --- a/SubstrateCS/Source/Entities/EntitySquid.cs +++ b/SubstrateCS/Source/Entities/EntitySquid.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound SquidSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Squid"), + new SchemaNodeString("id", TypeId), }); - public EntitySquid () - : base("Squid") + public static string TypeId { + get { return "Squid"; } } protected EntitySquid (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntitySquid () + : this(TypeId) + { + } + public EntitySquid (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/Entities/EntityThrowable.cs b/SubstrateCS/Source/Entities/EntityThrowable.cs index 71d416f..c9a0f3c 100644 --- a/SubstrateCS/Source/Entities/EntityThrowable.cs +++ b/SubstrateCS/Source/Entities/EntityThrowable.cs @@ -61,11 +61,6 @@ namespace Substrate.Entities set { _inGround = (byte)(value ? 1 : 0); } } - public EntityThrowable (string id) - : base(id) - { - } - protected EntityThrowable (string id) : base(id) { diff --git a/SubstrateCS/Source/Entities/EntityVillager.cs b/SubstrateCS/Source/Entities/EntityVillager.cs index 3fd4885..974a9bc 100644 --- a/SubstrateCS/Source/Entities/EntityVillager.cs +++ b/SubstrateCS/Source/Entities/EntityVillager.cs @@ -19,10 +19,15 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound VillagerSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Villager"), + new SchemaNodeString("id", TypeId), new SchemaNodeScaler("Profession", TagType.TAG_INT), }); + public static string TypeId + { + get { return "Villager"; } + } + private int _profession; public VillagerProfession Profession @@ -31,13 +36,13 @@ namespace Substrate.Entities set { _profession = (int)value; } } - public EntityVillager () - : base("Villager") + protected EntityVillager (string id) + : base(id) { } - protected EntityVillager (string id) - : base(id) + public EntityVillager () + : this(TypeId) { } diff --git a/SubstrateCS/Source/Entities/EntityWolf.cs b/SubstrateCS/Source/Entities/EntityWolf.cs index 7b2728e..9a7f01e 100644 --- a/SubstrateCS/Source/Entities/EntityWolf.cs +++ b/SubstrateCS/Source/Entities/EntityWolf.cs @@ -10,12 +10,17 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound WolfSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Wolf"), + new SchemaNodeString("id", TypeId), new SchemaNodeScaler("Owner", TagType.TAG_STRING), new SchemaNodeScaler("Sitting", TagType.TAG_BYTE), new SchemaNodeScaler("Angry", TagType.TAG_BYTE), }); + public static string TypeId + { + get { return "Wolf"; } + } + private string _owner; private bool _sitting; private bool _angry; @@ -38,13 +43,13 @@ namespace Substrate.Entities set { _angry = value; } } - public EntityWolf () - : base("Wolf") + protected EntityWolf (string id) + : base(id) { } - protected EntityWolf (string id) - : base(id) + public EntityWolf () + : this(TypeId) { } diff --git a/SubstrateCS/Source/Entities/EntityXPOrb.cs b/SubstrateCS/Source/Entities/EntityXPOrb.cs index c0aca8b..3dd4759 100644 --- a/SubstrateCS/Source/Entities/EntityXPOrb.cs +++ b/SubstrateCS/Source/Entities/EntityXPOrb.cs @@ -10,11 +10,17 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound XPOrbSchema = TypedEntity.Schema.MergeInto(new SchemaNodeCompound("") { + new SchemaNodeString("id", TypeId), new SchemaNodeScaler("Health", TagType.TAG_SHORT), new SchemaNodeScaler("Age", TagType.TAG_SHORT), new SchemaNodeScaler("Value", TagType.TAG_SHORT), }); + public static string TypeId + { + get { return "XPOrb"; } + } + private short _health; private short _age; private short _value; @@ -37,13 +43,13 @@ namespace Substrate.Entities set { _value = (short)value; } } - public EntityXPOrb () - : base("XPOrb") + protected EntityXPOrb (string id) + : base(id) { } - protected EntityXPOrb (string id) - : base(id) + public EntityXPOrb () + : this(TypeId) { } diff --git a/SubstrateCS/Source/Entities/EntityZombie.cs b/SubstrateCS/Source/Entities/EntityZombie.cs index ccdcd0b..f0e9a8b 100644 --- a/SubstrateCS/Source/Entities/EntityZombie.cs +++ b/SubstrateCS/Source/Entities/EntityZombie.cs @@ -10,12 +10,12 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound ZombieSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Zombie"), + new SchemaNodeString("id", TypeId), }); - public EntityZombie () - : base("Zombie") + public static string TypeId { + get { return "Zombie"; } } protected EntityZombie (string id) @@ -23,6 +23,11 @@ namespace Substrate.Entities { } + public EntityZombie () + : this(TypeId) + { + } + public EntityZombie (TypedEntity e) : base(e) { diff --git a/SubstrateCS/Source/EntityFactory.cs b/SubstrateCS/Source/EntityFactory.cs index b5304c1..ac18758 100644 --- a/SubstrateCS/Source/EntityFactory.cs +++ b/SubstrateCS/Source/EntityFactory.cs @@ -79,45 +79,45 @@ namespace Substrate static EntityFactory () { - _registry["Arrow"] = typeof(EntityArrow); - _registry["Blaze"] = typeof(EntityBlaze); - _registry["Boat"] = typeof(EntityBoat); - _registry["CaveSpider"] = typeof(EntityCaveSpider); - _registry["Chicken"] = typeof(EntityChicken); - _registry["Cow"] = typeof(EntityCow); - _registry["Creeper"] = typeof(EntityCreeper); - _registry["Egg"] = typeof(EntityEgg); - _registry["EnderDragon"] = typeof(EntityEnderDragon); - _registry["Enderman"] = typeof(EntityEnderman); - _registry["EyeOfEnderSignal"] = typeof(EntityEnderEye); - _registry["FallingSand"] = typeof(EntityFallingSand); - _registry["Fireball"] = typeof(EntityFireball); - _registry["Ghast"] = typeof(EntityGhast); - _registry["Giant"] = typeof(EntityGiant); - _registry["Item"] = typeof(EntityItem); - _registry["LavaSlime"] = typeof(EntityMagmaCube); - _registry["Minecart"] = typeof(EntityMinecart); - _registry["Mob"] = typeof(EntityMob); - _registry["Monster"] = typeof(EntityMonster); - _registry["MushroomCow"] = typeof(EntityMooshroom); - _registry["Painting"] = typeof(EntityPainting); - _registry["Pig"] = typeof(EntityPig); - _registry["PigZombie"] = typeof(EntityPigZombie); - _registry["PrimedTnt"] = typeof(EntityPrimedTnt); - _registry["Sheep"] = typeof(EntitySheep); - _registry["Silverfish"] = typeof(EntitySilverfish); - _registry["Skeleton"] = typeof(EntitySkeleton); - _registry["Slime"] = typeof(EntitySlime); - _registry["SmallFireball"] = typeof(EntitySmallFireball); - _registry["Snowball"] = typeof(EntitySnowball); - _registry["SnowMan"] = typeof(EntitySnowman); - _registry["Spider"] = typeof(EntitySpider); - _registry["Squid"] = typeof(EntitySquid); - _registry["ThrownEnderpearl"] = typeof(EntityEnderPearl); - _registry["Villager"] = typeof(EntityVillager); - _registry["Wolf"] = typeof(EntityWolf); - _registry["XPOrb"] = typeof(EntityXPOrb); - _registry["Zombie"] = typeof(EntityZombie); + _registry[EntityArrow.TypeId] = typeof(EntityArrow); + _registry[EntityBlaze.TypeId] = typeof(EntityBlaze); + _registry[EntityBoat.TypeId] = typeof(EntityBoat); + _registry[EntityCaveSpider.TypeId] = typeof(EntityCaveSpider); + _registry[EntityChicken.TypeId] = typeof(EntityChicken); + _registry[EntityCow.TypeId] = typeof(EntityCow); + _registry[EntityCreeper.TypeId] = typeof(EntityCreeper); + _registry[EntityEgg.TypeId] = typeof(EntityEgg); + _registry[EntityEnderDragon.TypeId] = typeof(EntityEnderDragon); + _registry[EntityEnderman.TypeId] = typeof(EntityEnderman); + _registry[EntityEnderEye.TypeId] = typeof(EntityEnderEye); + _registry[EntityFallingSand.TypeId] = typeof(EntityFallingSand); + _registry[EntityFireball.TypeId] = typeof(EntityFireball); + _registry[EntityGhast.TypeId] = typeof(EntityGhast); + _registry[EntityGiant.TypeId] = typeof(EntityGiant); + _registry[EntityItem.TypeId] = typeof(EntityItem); + _registry[EntityMagmaCube.TypeId] = typeof(EntityMagmaCube); + _registry[EntityMinecart.TypeId] = typeof(EntityMinecart); + _registry[EntityMob.TypeId] = typeof(EntityMob); + _registry[EntityMonster.TypeId] = typeof(EntityMonster); + _registry[EntityMooshroom.TypeId] = typeof(EntityMooshroom); + _registry[EntityPainting.TypeId] = typeof(EntityPainting); + _registry[EntityPig.TypeId] = typeof(EntityPig); + _registry[EntityPigZombie.TypeId] = typeof(EntityPigZombie); + _registry[EntityPrimedTnt.TypeId] = typeof(EntityPrimedTnt); + _registry[EntitySheep.TypeId] = typeof(EntitySheep); + _registry[EntitySilverfish.TypeId] = typeof(EntitySilverfish); + _registry[EntitySkeleton.TypeId] = typeof(EntitySkeleton); + _registry[EntitySlime.TypeId] = typeof(EntitySlime); + _registry[EntitySmallFireball.TypeId] = typeof(EntitySmallFireball); + _registry[EntitySnowball.TypeId] = typeof(EntitySnowball); + _registry[EntitySnowman.TypeId] = typeof(EntitySnowman); + _registry[EntitySpider.TypeId] = typeof(EntitySpider); + _registry[EntitySquid.TypeId] = typeof(EntitySquid); + _registry[EntityEnderPearl.TypeId] = typeof(EntityEnderPearl); + _registry[EntityVillager.TypeId] = typeof(EntityVillager); + _registry[EntityWolf.TypeId] = typeof(EntityWolf); + _registry[EntityXPOrb.TypeId] = typeof(EntityXPOrb); + _registry[EntityZombie.TypeId] = typeof(EntityZombie); } } }