Added New Dungeons and Fixed Various Minor Bugs #43

Merged
SenseiKiwi merged 13 commits from master into master 2013-07-17 07:02:10 +00:00
Showing only changes of commit d805d63c0a - Show all commits

View File

@@ -900,12 +900,10 @@ public class SchematicLoader
else if (currentBlock == DungeonHelper.FABRIC_OF_REALITY_EXPORT_ID) else if (currentBlock == DungeonHelper.FABRIC_OF_REALITY_EXPORT_ID)
{ {
currentBlock = mod_pocketDim.blockDimWall.blockID; currentBlock = mod_pocketDim.blockDimWall.blockID;
blockChanged = true;
} }
else if (currentBlock == DungeonHelper.PERMAFABRIC_EXPORT_ID) else if (currentBlock == DungeonHelper.PERMAFABRIC_EXPORT_ID)
{ {
currentBlock = mod_pocketDim.blockDimWallPerm.blockID; currentBlock = mod_pocketDim.blockDimWallPerm.blockID;
blockChanged = true;
} }
else if ((Block.blocksList[currentBlock] == null && currentBlock != 0) || currentBlock > MAX_VANILLA_BLOCK_ID) else if ((Block.blocksList[currentBlock] == null && currentBlock != 0) || currentBlock > MAX_VANILLA_BLOCK_ID)
{ {
@@ -916,20 +914,29 @@ public class SchematicLoader
//Place blocks and set metadata //Place blocks and set metadata
if (currentBlock > 0) if (currentBlock > 0)
{ {
//Calculate new metadata for blocks that have orientations (e.g. doors, pistons) int fixedMetadata;
//We're using a workaround to get the desired rotation relative to the schematic's entrance
int fixedMetadata = transformMetadata(blockMetadata, (orientation + NORTH_DOOR_METADATA - entryDirection + 16) % 4, currentBlock); if (!blockChanged)
{
//Calculate new metadata for blocks that have orientations (e.g. doors, pistons)
//We're using a workaround to get the desired rotation relative to the schematic's entrance
fixedMetadata = transformMetadata(blockMetadata, (orientation + NORTH_DOOR_METADATA - entryDirection + 16) % 4, currentBlock);
}
else
{
//Don't include metadata for changed blocks. It's possible that the metadata belonged to a mod block.
//If we include it now, it could cause our Fabric of Reality to change into permafabric.
fixedMetadata = 0;
}
//Convert vanilla doors to dim doors or place blocks //Convert vanilla doors to dim doors or place blocks
if (currentBlock == Block.doorIron.blockID) if (currentBlock == Block.doorIron.blockID)
{ {
setBlockDirectly(world, realX, realY, realZ, properties.DimensionalDoorID, fixedMetadata); setBlockDirectly(world, realX, realY, realZ, properties.DimensionalDoorID, fixedMetadata);
blockChanged = true;
} }
else if (currentBlock == Block.doorWood.blockID) else if (currentBlock == Block.doorWood.blockID)
{ {
setBlockDirectly(world, realX, realY, realZ, properties.WarpDoorID, fixedMetadata); setBlockDirectly(world, realX, realY, realZ, properties.WarpDoorID, fixedMetadata);
blockChanged = true;
} }
else else
{ {