From 9f3312d790b482873d678e98d665a8985df07e5a Mon Sep 17 00:00:00 2001 From: Justin Aquadro Date: Sun, 4 Nov 2012 21:05:28 -0500 Subject: [PATCH] Exposing raw NBT Source property to several INbtObjects --- SubstrateCS/Source/Entity.cs | 8 ++++++++ SubstrateCS/Source/Item.cs | 8 ++++++++ SubstrateCS/Source/Level.cs | 8 ++++++++ SubstrateCS/Source/TileEntity.cs | 2 +- 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/SubstrateCS/Source/Entity.cs b/SubstrateCS/Source/Entity.cs index 99ee315..6dc1702 100644 --- a/SubstrateCS/Source/Entity.cs +++ b/SubstrateCS/Source/Entity.cs @@ -96,6 +96,14 @@ namespace Substrate set { _onGround = (byte)(value ? 1 : 0); } } + /// + /// Gets the source used to create this if it exists. + /// + public TagNodeCompound Source + { + get { return _source; } + } + /// /// Constructs a new generic with default values. /// diff --git a/SubstrateCS/Source/Item.cs b/SubstrateCS/Source/Item.cs index a196411..9c203fe 100644 --- a/SubstrateCS/Source/Item.cs +++ b/SubstrateCS/Source/Item.cs @@ -95,6 +95,14 @@ namespace Substrate get { return _enchantments; } } + /// + /// Gets the source used to create this if it exists. + /// + public TagNodeCompound Source + { + get { return _source; } + } + /// /// Gets a representing the schema of an item. /// diff --git a/SubstrateCS/Source/Level.cs b/SubstrateCS/Source/Level.cs index 1e5704d..03d26c3 100644 --- a/SubstrateCS/Source/Level.cs +++ b/SubstrateCS/Source/Level.cs @@ -238,6 +238,14 @@ namespace Substrate set { _hardcore = value ? (byte)1 : (byte)0; } } + /// + /// Gets the source used to create this if it exists. + /// + public TagNodeCompound Source + { + get { return _source; } + } + /// /// Gets a representing the schema of a level. /// diff --git a/SubstrateCS/Source/TileEntity.cs b/SubstrateCS/Source/TileEntity.cs index 5fa3abb..fe26ab4 100644 --- a/SubstrateCS/Source/TileEntity.cs +++ b/SubstrateCS/Source/TileEntity.cs @@ -65,7 +65,7 @@ namespace Substrate /// /// Gets the source used to create this if it exists. /// - protected TagNodeCompound Source + public TagNodeCompound Source { get { return _source; } }