Added New Dungeons and Fixed Various Minor Bugs #43
@@ -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)
|
||||||
{
|
{
|
||||||
@@ -915,21 +913,30 @@ public class SchematicLoader
|
|||||||
|
|
||||||
//Place blocks and set metadata
|
//Place blocks and set metadata
|
||||||
if (currentBlock > 0)
|
if (currentBlock > 0)
|
||||||
|
{
|
||||||
|
int fixedMetadata;
|
||||||
|
|
||||||
|
if (!blockChanged)
|
||||||
{
|
{
|
||||||
//Calculate new metadata for blocks that have orientations (e.g. doors, pistons)
|
//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
|
//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);
|
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
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user