Merge remote-tracking branch 'upstream/master' into DungeonPacks
This commit is contained in:
commit
68bf4a16c1
14 changed files with 18 additions and 21 deletions
|
@ -76,7 +76,7 @@ public class RiftGenerator implements IWorldGenerator
|
|||
//Otherwise, create a one-way link and connect to the destination of the first link.
|
||||
if (link == null)
|
||||
{
|
||||
link = new LinkData(world.provider.dimensionId, 0, x, y + 1, z, x, y + 1, z, true, random.nextInt(4));
|
||||
link = new LinkData(world.provider.dimensionId, 0, x, y + 1, z, x, y + 1, z, true, 0);
|
||||
link = dimHelper.instance.createPocket(link, true, true);
|
||||
}
|
||||
else
|
||||
|
@ -111,7 +111,7 @@ public class RiftGenerator implements IWorldGenerator
|
|||
{
|
||||
//Create a two-way link between the upper block of the gateway and a pocket dimension
|
||||
//That pocket dimension is where we'll start a dungeon!
|
||||
link = new LinkData(world.provider.dimensionId, 0, x, y + 1, z, x, y + 1, z, true, random.nextInt(4));
|
||||
link = new LinkData(world.provider.dimensionId, 0, x, y + 1, z, x, y + 1, z, true, 0);
|
||||
link = dimHelper.instance.createPocket(link, true, true);
|
||||
|
||||
//If the current dimension isn't Limbo, build a Rift Gateway out of Stone Bricks
|
||||
|
|
|
@ -65,7 +65,7 @@ public class ExitDoor extends dimDoor
|
|||
int ExitDimID = dimData.exitDimLink.destDimID;
|
||||
if(dimHelper.instance.getDimData(par1World.provider.dimensionId).isPocket)
|
||||
{
|
||||
int yCoord=yCoordHelper.getFirstUncovered(ExitDimID, par2, par3, par4);
|
||||
int yCoord=yCoordHelper.getFirstUncovered(ExitDimID, par2, par3, par4)-1;
|
||||
|
||||
|
||||
dimHelper.instance.createLink(locDimID, ExitDimID, par2, par3, par4, par2, yCoord, par4,par1World.getBlockMetadata(par2, par3-1, par4));
|
||||
|
|
|
@ -255,6 +255,15 @@ public class dimHelper extends DimensionManager
|
|||
{
|
||||
for(int count=0;count<20;count++)
|
||||
{
|
||||
if(!entity.worldObj.isAirBlock(playerXCoord, playerYCoord-2-count,playerZCoord))
|
||||
{
|
||||
if(Block.blocksList[entity.worldObj.getBlockId(playerXCoord, playerYCoord-2-count,playerZCoord)].blockMaterial.isLiquid())
|
||||
{
|
||||
entity.worldObj.setBlock(playerXCoord, playerYCoord-1, playerZCoord, properties.FabricBlockID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(entity.worldObj.isBlockOpaqueCube(playerXCoord, playerYCoord-1-count,playerZCoord))
|
||||
{
|
||||
break;
|
||||
|
@ -265,15 +274,11 @@ public class dimHelper extends DimensionManager
|
|||
}
|
||||
}
|
||||
}
|
||||
if(entity.worldObj.getBlockId(playerXCoord, playerYCoord-1,playerZCoord )==Block.lavaStill.blockID)
|
||||
{
|
||||
entity.worldObj.setBlock(playerXCoord, playerYCoord-1, playerZCoord, properties.FabricBlockID);
|
||||
}
|
||||
|
||||
this.generateDoor(world,linkData);
|
||||
|
||||
//FIXME: Why are we checking blockList.length? Not necessary. getBlockId() can't return an ID past the end of the block list.
|
||||
//Plus even if the check is necessary, it's still wrong since it should be less than, not less than or equal to.
|
||||
if(Block.blocksList.length>=entity.worldObj.getBlockId(playerXCoord,playerYCoord+1,playerZCoord)&&!entity.worldObj.isAirBlock(playerXCoord,playerYCoord+1,playerZCoord))
|
||||
|
||||
if(!entity.worldObj.isAirBlock(playerXCoord,playerYCoord+1,playerZCoord))
|
||||
{
|
||||
if(Block.blocksList[entity.worldObj.getBlockId(playerXCoord,playerYCoord+1,playerZCoord)].isOpaqueCube() &&
|
||||
!mod_pocketDim.blockRift.isBlockImmune(entity.worldObj, playerXCoord+1,playerYCoord,playerZCoord))
|
||||
|
@ -281,7 +286,7 @@ public class dimHelper extends DimensionManager
|
|||
entity.worldObj.setBlock(playerXCoord,playerYCoord+1,playerZCoord,0);
|
||||
}
|
||||
}
|
||||
if (Block.blocksList.length >= entity.worldObj.getBlockId(playerXCoord,playerYCoord,playerZCoord)&&!entity.worldObj.isAirBlock(playerXCoord,playerYCoord,playerZCoord))
|
||||
if (!entity.worldObj.isAirBlock(playerXCoord,playerYCoord,playerZCoord))
|
||||
{
|
||||
if(Block.blocksList[entity.worldObj.getBlockId(playerXCoord,playerYCoord,playerZCoord)].isOpaqueCube() &&
|
||||
!mod_pocketDim.blockRift.isBlockImmune(entity.worldObj, playerXCoord,playerYCoord,playerZCoord))
|
||||
|
@ -291,14 +296,6 @@ public class dimHelper extends DimensionManager
|
|||
}
|
||||
}
|
||||
}
|
||||
//FIXME: Wtf? This code is useless. It doesn't seem to do anything! If that's the case, it should be removed. ~SenseiKiwi
|
||||
else if(!dimHelper.dimList.containsKey(world.provider.dimensionId))
|
||||
{
|
||||
if(!(world.provider instanceof PocketProvider ||world.provider instanceof LimboProvider))
|
||||
{
|
||||
DimData data = new DimData(world.provider.dimensionId, false, 0, 0, world.getSpawnPoint().posX, world.getSpawnPoint().posY, world.getSpawnPoint().posZ);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,6 +67,6 @@ public class yCoordHelper
|
|||
return false;
|
||||
|
||||
material = block.blockMaterial;
|
||||
return (!material.isLiquid() && !material.isReplaceable());
|
||||
return (material.isLiquid() || !material.isReplaceable());
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue