diff --git a/SubstrateCS/Source/EntityFactory.cs b/SubstrateCS/Source/EntityFactory.cs index ac18758..df975db 100644 --- a/SubstrateCS/Source/EntityFactory.cs +++ b/SubstrateCS/Source/EntityFactory.cs @@ -77,6 +77,19 @@ namespace Substrate _registry[id] = subtype; } + /// + /// Gets an enumerator over all registered Entities. + /// + public static IEnumerable> RegisteredEntities + { + get + { + foreach (KeyValuePair kvp in _registry) { + yield return kvp; + } + } + } + static EntityFactory () { _registry[EntityArrow.TypeId] = typeof(EntityArrow); diff --git a/SubstrateCS/Source/TileEntityFactory.cs b/SubstrateCS/Source/TileEntityFactory.cs index a9619eb..48bd00e 100644 --- a/SubstrateCS/Source/TileEntityFactory.cs +++ b/SubstrateCS/Source/TileEntityFactory.cs @@ -75,6 +75,19 @@ namespace Substrate _registry[id] = subtype; } + /// + /// Gets an enumerator over all registered TileEntities. + /// + public static IEnumerable> RegisteredTileEntities + { + get + { + foreach (KeyValuePair kvp in _registry) { + yield return kvp; + } + } + } + static TileEntityFactory () { _registry[TileEntityEndPortal.TypeId] = typeof(TileEntityEndPortal);