Fixed bug in TileEntity factory

This commit is contained in:
Justin Aquadro 2011-04-10 21:04:33 +00:00
parent e88ea3c69a
commit 37d58fcf91
7 changed files with 18 additions and 12 deletions

View file

@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Substrate")] [assembly: AssemblyTitle("Substrate")]
[assembly: AssemblyDescription("Minecraft map SDK")] [assembly: AssemblyDescription("Minecraft map SDK")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Substrate.Properties")] [assembly: AssemblyProduct("Substrate")]
[assembly: AssemblyCopyright("2011 Justin Aquadro")] [assembly: AssemblyCopyright("2011 Justin Aquadro")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number // Build Number
// Revision // Revision
// //
[assembly: AssemblyVersion("0.1.0.0")] [assembly: AssemblyVersion("0.2.0.0")]
[assembly: AssemblyFileVersion("0.1.0.0")] [assembly: AssemblyFileVersion("0.2.0.0")]

View file

@ -82,6 +82,8 @@ namespace Substrate
public interface IAlphaBlockContainer : ILitBlockContainer, IPropertyBlockContainer public interface IAlphaBlockContainer : ILitBlockContainer, IPropertyBlockContainer
{ {
new Block GetBlock (int x, int y, int z);
new BlockRef GetBlockRef (int x, int y, int z);
} }
public interface IBlockManager : IAlphaBlockContainer public interface IBlockManager : IAlphaBlockContainer

View file

@ -1,9 +1,8 @@
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text;
using System.IO; using System.IO;
using Ionic.Zlib; using Ionic.Zlib;
using System.Collections;
namespace Substrate namespace Substrate
{ {

View file

@ -1,7 +1,7 @@
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Collections;
namespace Substrate namespace Substrate
{ {
@ -15,7 +15,11 @@ namespace Substrate
bool DeleteRegion (int rx, int rz); bool DeleteRegion (int rx, int rz);
} }
public class RegionManager : IRegionContainer, IEnumerable<Region> public interface IRegionManager : IRegionContainer, IEnumerable<Region>
{
}
public class RegionManager : IRegionManager
{ {
protected string _regionPath; protected string _regionPath;

View file

@ -18,7 +18,7 @@ namespace Substrate
return null; return null;
} }
return Activator.CreateInstance(t, new object[] { type }) as TileEntity; return Activator.CreateInstance(t) as TileEntity;
} }
public static TileEntity Create (TagCompound tree) public static TileEntity Create (TagCompound tree)

View file

@ -162,6 +162,9 @@ namespace Substrate
{ {
get { return _blockMan; } get { return _blockMan; }
} }
//public static BetaWorld Open (string path);
//public static BetaWorld Create (string path);
} }
} }

View file

@ -59,8 +59,6 @@
<HintPath>Assemblies\Ionic.Zlib.dll</HintPath> <HintPath>Assemblies\Ionic.Zlib.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Source\Level.cs" /> <Compile Include="Source\Level.cs" />