Fixed inventory-based Tile Entity verification failure

This commit is contained in:
Justin Aquadro 2011-06-10 05:46:05 +00:00
parent 3f55f419d6
commit bfe7efcd1c
8 changed files with 25 additions and 4 deletions

View file

@ -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)

View file

@ -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 + ")";
}
}
}

View file

@ -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;

View file

@ -47,5 +47,10 @@ namespace Substrate
{
return k1.cx != k2.cx || k1.cz != k2.cz;
}
public override string ToString ()
{
return "(" + cx + ", " + cz + ")";
}
}
}

View file

@ -47,5 +47,10 @@ namespace Substrate
{
return k1.rx != k2.rx || k1.rz != k2.rz;
}
public override string ToString ()
{
return "(" + rx + ", " + rz + ")";
}
}
}

View file

@ -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;

View file

@ -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;

View file

@ -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;