fixed random dim stuff when dungeons are generated
Signed-off-by: StevenRS11 <stevenrs11@aol.com>
This commit is contained in:
@@ -845,10 +845,15 @@ public class SchematicLoader
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
if(world.getBlockId(point.getX(), point.getY(), point.getZ())==mod_pocketDim.ExitDoorID&&world.getBlockId(point.getX(), point.getY()-1, point.getZ())==mod_pocketDim.ExitDoorID&&world.getBlockId(point.getX(), point.getY()-2, point.getZ())==Block.sandStone.blockID)
|
if(world.getBlockId(point.getX(), point.getY(), point.getZ())==mod_pocketDim.ExitDoorID&&world.getBlockId(point.getX(), point.getY()-1, point.getZ())==mod_pocketDim.ExitDoorID&&world.getBlockId(point.getX(), point.getY()-2, point.getZ())==Block.sandStone.blockID)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
LinkData randomLink=dimHelper.instance.getRandomLinkData(false);
|
||||||
|
if(randomLink!=null&&dimHelper.instance.getDimDepth(world.provider.dimensionId)>4)
|
||||||
|
{
|
||||||
|
dimHelper.dimList.get(world.provider.dimensionId).exitDimLink.destDimID=randomLink.locDimID;
|
||||||
|
}
|
||||||
if(dimHelper.getWorld(dimHelper.dimList.get(world.provider.dimensionId).exitDimLink.destDimID)==null)
|
if(dimHelper.getWorld(dimHelper.dimList.get(world.provider.dimensionId).exitDimLink.destDimID)==null)
|
||||||
{
|
{
|
||||||
dimHelper.initDimension((dimHelper.dimList.get(world.provider.dimensionId).exitDimLink.destDimID));
|
dimHelper.initDimension((dimHelper.dimList.get(world.provider.dimensionId).exitDimLink.destDimID));
|
||||||
@@ -859,12 +864,12 @@ public class SchematicLoader
|
|||||||
dimHelper.getWorld(dimHelper.dimList.get(world.provider.dimensionId).exitDimLink.destDimID).getChunkProvider().loadChunk(point.getX() >> 4, point.getZ() >> 4);
|
dimHelper.getWorld(dimHelper.dimList.get(world.provider.dimensionId).exitDimLink.destDimID).getChunkProvider().loadChunk(point.getX() >> 4, point.getZ() >> 4);
|
||||||
|
|
||||||
LinkData sideLink = new LinkData(link.destDimID,dimHelper.dimList.get(link.locDimID).exitDimLink.destDimID,point.getX(), point.getY(), point.getZ(),point.getX(), dimHelper.getWorld(dimHelper.dimList.get(world.provider.dimensionId).exitDimLink.destDimID).getHeightValue(point.getX(), point.getZ())+1, point.getZ(),true);
|
LinkData sideLink = new LinkData(link.destDimID,dimHelper.dimList.get(link.locDimID).exitDimLink.destDimID,point.getX(), point.getY(), point.getZ(),point.getX(), dimHelper.getWorld(dimHelper.dimList.get(world.provider.dimensionId).exitDimLink.destDimID).getHeightValue(point.getX(), point.getZ())+1, point.getZ(),true);
|
||||||
sideLink.linkOrientation=world.getBlockMetadata(point.getX(), point.getY()-1, point.getZ());
|
|
||||||
|
sideLink.linkOrientation=world.getBlockMetadata(point.getX(), point.getY()-1, point.getZ());
|
||||||
dimHelper.instance.createLink(sideLink);
|
dimHelper.instance.createLink(sideLink);
|
||||||
dimHelper.instance.createLink(sideLink.destDimID , sideLink.locDimID, sideLink.destXCoord, sideLink.destYCoord, sideLink.destZCoord, sideLink.locXCoord, sideLink.locYCoord, sideLink.locZCoord, dimHelper.instance.flipDoorMetadata(sideLink.linkOrientation));
|
dimHelper.instance.createLink(sideLink.destDimID , sideLink.locDimID, sideLink.destXCoord, sideLink.destYCoord, sideLink.destZCoord, sideLink.locXCoord, sideLink.locYCoord, sideLink.locZCoord, dimHelper.instance.flipDoorMetadata(sideLink.linkOrientation));
|
||||||
|
|
||||||
|
|
||||||
setBlockDirectly(world,point.getX(), point.getY()-2, point.getZ(), Block.stone.blockID,0);
|
|
||||||
// setBlockDirectly(world,point.getX(), point.getY()-1, point.getZ(),mod_pocketDim.ExitDoorID,sideLink.linkOrientation);
|
// setBlockDirectly(world,point.getX(), point.getY()-1, point.getZ(),mod_pocketDim.ExitDoorID,sideLink.linkOrientation);
|
||||||
// setBlockDirectly(world,point.getX(), point.getY(), point.getZ(),mod_pocketDim.ExitDoorID,8);
|
// setBlockDirectly(world,point.getX(), point.getY(), point.getZ(),mod_pocketDim.ExitDoorID,8);
|
||||||
|
|
||||||
|
|||||||
@@ -342,7 +342,7 @@ public class mod_pocketDim
|
|||||||
itemStableFabric = (new ItemStableFabric(itemStableFabricID, 0)).setUnlocalizedName("itemStableFabric");
|
itemStableFabric = (new ItemStableFabric(itemStableFabricID, 0)).setUnlocalizedName("itemStableFabric");
|
||||||
itemChaosDoor = (new ItemChaosDoor(itemChaosDoorID, Material.iron)).setUnlocalizedName("itemChaosDoor");
|
itemChaosDoor = (new ItemChaosDoor(itemChaosDoorID, Material.iron)).setUnlocalizedName("itemChaosDoor");
|
||||||
itemRiftBlade = (new ItemRiftBlade(itemRiftBladeID, Material.iron)).setUnlocalizedName("ItemRiftBlade");
|
itemRiftBlade = (new ItemRiftBlade(itemRiftBladeID, Material.iron)).setUnlocalizedName("ItemRiftBlade");
|
||||||
// itemStabilizedLinkSignature = (new ItemStabilizedRiftSignature(itemStabilizedLinkSignatureID)).setUnlocalizedName("itemStabilizedRiftSig");
|
itemStabilizedLinkSignature = (new ItemStabilizedRiftSignature(itemStabilizedLinkSignatureID)).setUnlocalizedName("itemStabilizedRiftSig");
|
||||||
|
|
||||||
|
|
||||||
proxy.loadTextures();
|
proxy.loadTextures();
|
||||||
@@ -387,7 +387,7 @@ public class mod_pocketDim
|
|||||||
|
|
||||||
LanguageRegistry.addName(itemExitDoor , "Warp Door");
|
LanguageRegistry.addName(itemExitDoor , "Warp Door");
|
||||||
LanguageRegistry.addName(itemLinkSignature , "Rift Signature");
|
LanguageRegistry.addName(itemLinkSignature , "Rift Signature");
|
||||||
// LanguageRegistry.addName(itemStabilizedLinkSignature, "Stabilized Rift Signature");
|
LanguageRegistry.addName(itemStabilizedLinkSignature, "Stabilized Rift Signature");
|
||||||
LanguageRegistry.addName(itemRiftRemover , "Rift Remover");
|
LanguageRegistry.addName(itemRiftRemover , "Rift Remover");
|
||||||
LanguageRegistry.addName(itemStableFabric , "Stable Fabric");
|
LanguageRegistry.addName(itemStableFabric , "Stable Fabric");
|
||||||
LanguageRegistry.addName(itemChaosDoor , "Unstable Door");
|
LanguageRegistry.addName(itemChaosDoor , "Unstable Door");
|
||||||
|
|||||||
Reference in New Issue
Block a user