diff --git a/Substrate/SubstrateCS/Source/BlockFluid.cs b/Substrate/SubstrateCS/Source/BlockFluid.cs index efba9ab..e5b6384 100644 --- a/Substrate/SubstrateCS/Source/BlockFluid.cs +++ b/Substrate/SubstrateCS/Source/BlockFluid.cs @@ -93,11 +93,13 @@ namespace Substrate public void UpdateWater (int x, int y, int z) { DoWater(x, y, z); + _chunks.Clear(); } public void UpdateLava (int x, int y, int z) { DoLava(x, y, z); + _chunks.Clear(); } public void RebuildWater () @@ -122,6 +124,8 @@ namespace Substrate foreach (BlockKey key in buildQueue) { DoWater(key.x, key.y, key.z); } + + _chunks.Clear(); } public void RebuildLava () @@ -146,6 +150,8 @@ namespace Substrate foreach (BlockKey key in buildQueue) { DoLava(key.x, key.y, key.z); } + + _chunks.Clear(); } private BlockCoord TranslateCoord (int x, int y, int z) diff --git a/Substrate/SubstrateCS/Source/BlockKey.cs b/Substrate/SubstrateCS/Source/BlockKey.cs index 862ec01..fa61bc5 100644 --- a/Substrate/SubstrateCS/Source/BlockKey.cs +++ b/Substrate/SubstrateCS/Source/BlockKey.cs @@ -50,5 +50,10 @@ namespace Substrate { return k1.x != k2.x || k1.y != k2.y || k1.z != k2.z; } + + public override string ToString () + { + return "(" + x + ", " + y + ", " + z + ")"; + } } } diff --git a/Substrate/SubstrateCS/Source/BlockLight.cs b/Substrate/SubstrateCS/Source/BlockLight.cs index 4440f9f..ed13bc3 100644 --- a/Substrate/SubstrateCS/Source/BlockLight.cs +++ b/Substrate/SubstrateCS/Source/BlockLight.cs @@ -304,7 +304,7 @@ namespace Substrate case BlockCollectionEdge.NORTH: for (int z = 0; z < zdim; z++) { for (int y = 0; y < ydim; y++) { - TestSkyLight(chunk, 0, y, z, xdim, y, z); + TestSkyLight(chunk, 0, y, z, xdim - 1, y, z); } } break; diff --git a/Substrate/SubstrateCS/Source/ChunkKey.cs b/Substrate/SubstrateCS/Source/ChunkKey.cs index 3c44323..4d0e5d2 100644 --- a/Substrate/SubstrateCS/Source/ChunkKey.cs +++ b/Substrate/SubstrateCS/Source/ChunkKey.cs @@ -47,5 +47,10 @@ namespace Substrate { return k1.cx != k2.cx || k1.cz != k2.cz; } + + public override string ToString () + { + return "(" + cx + ", " + cz + ")"; + } } } diff --git a/Substrate/SubstrateCS/Source/RegionKey.cs b/Substrate/SubstrateCS/Source/RegionKey.cs index cf1e6d4..2fe8d44 100644 --- a/Substrate/SubstrateCS/Source/RegionKey.cs +++ b/Substrate/SubstrateCS/Source/RegionKey.cs @@ -47,5 +47,10 @@ namespace Substrate { return k1.rx != k2.rx || k1.rz != k2.rz; } + + public override string ToString () + { + return "(" + rx + ", " + rz + ")"; + } } } diff --git a/Substrate/SubstrateCS/Source/TileEntities/TileEntityChest.cs b/Substrate/SubstrateCS/Source/TileEntities/TileEntityChest.cs index e74cd41..17cca71 100644 --- a/Substrate/SubstrateCS/Source/TileEntities/TileEntityChest.cs +++ b/Substrate/SubstrateCS/Source/TileEntities/TileEntityChest.cs @@ -11,7 +11,7 @@ namespace Substrate.TileEntities public static readonly NBTCompoundNode ChestSchema = BaseSchema.MergeInto(new NBTCompoundNode("") { new NBTStringNode("id", "Chest"), - new NBTListNode("Items", TagType.TAG_COMPOUND, ItemCollection.ListSchema), + new NBTListNode("Items", TagType.TAG_COMPOUND, ItemCollection.InventorySchema), }); private const int _CAPACITY = 27; diff --git a/Substrate/SubstrateCS/Source/TileEntities/TileEntityFurnace.cs b/Substrate/SubstrateCS/Source/TileEntities/TileEntityFurnace.cs index 112caa8..c4fdc31 100644 --- a/Substrate/SubstrateCS/Source/TileEntities/TileEntityFurnace.cs +++ b/Substrate/SubstrateCS/Source/TileEntities/TileEntityFurnace.cs @@ -13,7 +13,7 @@ namespace Substrate.TileEntities new NBTStringNode("id", "Furnace"), new NBTScalerNode("BurnTime", TagType.TAG_SHORT), new NBTScalerNode("CookTime", TagType.TAG_SHORT), - new NBTListNode("Items", TagType.TAG_COMPOUND, ItemCollection.ListSchema), + new NBTListNode("Items", TagType.TAG_COMPOUND, ItemCollection.InventorySchema), }); private const int _CAPACITY = 3; diff --git a/Substrate/SubstrateCS/Source/TileEntities/TileEntityTrap.cs b/Substrate/SubstrateCS/Source/TileEntities/TileEntityTrap.cs index fc0dd83..c3828d7 100644 --- a/Substrate/SubstrateCS/Source/TileEntities/TileEntityTrap.cs +++ b/Substrate/SubstrateCS/Source/TileEntities/TileEntityTrap.cs @@ -11,7 +11,7 @@ namespace Substrate.TileEntities public static readonly NBTCompoundNode TrapSchema = BaseSchema.MergeInto(new NBTCompoundNode("") { new NBTStringNode("id", "Trap"), - new NBTListNode("Items", TagType.TAG_COMPOUND, ItemCollection.ListSchema), + new NBTListNode("Items", TagType.TAG_COMPOUND, ItemCollection.InventorySchema), }); private const int _CAPACITY = 8;