From ee60d217a1aa33b5096a2b99f3be146a6e005647 Mon Sep 17 00:00:00 2001 From: Justin Aquadro Date: Fri, 4 Nov 2011 23:49:08 -0400 Subject: [PATCH] Fixing enderman bug --- SubstrateCS/Source/BlockInfo.cs | 9 +++++++++ SubstrateCS/Source/Entities/EntityEnderman.cs | 2 +- SubstrateCS/Source/ItemInfo.cs | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/SubstrateCS/Source/BlockInfo.cs b/SubstrateCS/Source/BlockInfo.cs index 084761a..a173198 100644 --- a/SubstrateCS/Source/BlockInfo.cs +++ b/SubstrateCS/Source/BlockInfo.cs @@ -7,6 +7,15 @@ namespace Substrate /// /// Provides named id values for known block types. /// + /// The BlockType constants are obsolete. The preferred method to lookup + /// Minecraft block IDs is to access the ID field of the corresponding static BlockInfo + /// object in the BlockInfo class. + /// The static BlockInfo objects can be re-bound to new BlockInfo objects, allowing + /// the named object to be bound to a new block ID. This gives the developer more flexibility + /// in supporting nonstandard worlds, and the ability to future-proof their application against + /// changes to Block IDs, by implementing functionality to import block/ID mappings from an + /// external source and rebinding the objects in BlockInfo. + [Obsolete("Prefer using BlockInfo.Something.ID over BlockType.SOMETHING")] public static class BlockType { public const int AIR = 0; diff --git a/SubstrateCS/Source/Entities/EntityEnderman.cs b/SubstrateCS/Source/Entities/EntityEnderman.cs index 6dd1a8a..f7a0184 100644 --- a/SubstrateCS/Source/Entities/EntityEnderman.cs +++ b/SubstrateCS/Source/Entities/EntityEnderman.cs @@ -14,7 +14,7 @@ namespace Substrate.Entities { public static readonly SchemaNodeCompound EndermanSchema = MobSchema.MergeInto(new SchemaNodeCompound("") { - new SchemaNodeString("id", "Sheep"), + new SchemaNodeString("id", "Enderman"), new SchemaNodeScaler("carried", TagType.TAG_SHORT, SchemaOptions.CREATE_ON_MISSING), new SchemaNodeScaler("carriedData", TagType.TAG_SHORT, SchemaOptions.CREATE_ON_MISSING), }); diff --git a/SubstrateCS/Source/ItemInfo.cs b/SubstrateCS/Source/ItemInfo.cs index 1ea5ac9..ea87405 100644 --- a/SubstrateCS/Source/ItemInfo.cs +++ b/SubstrateCS/Source/ItemInfo.cs @@ -7,6 +7,9 @@ namespace Substrate /// /// Provides named id values for known item types. /// + /// The BlockType constants are obsolete. See for additional + /// information. + [Obsolete("Prefer using ItemInfo.Something.ID over ItemType.SOMETHING")] public static class ItemType { public const int IRON_SHOVEL = 256;