Minor fixes

Rift placement with /dd-rift is fixed
Signs rotate properly
consistent behavior for wooden dim doors in pockets and dungeons
This commit is contained in:
StevenRS11 2013-08-23 01:30:24 -04:00
parent 3e3bd95844
commit a1a9e39caa
3 changed files with 80 additions and 5 deletions

View file

@ -4,6 +4,7 @@ import java.io.File;
import java.util.Collection;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MathHelper;
import StevenDimDoors.mod_pocketDim.DungeonGenerator;
import StevenDimDoors.mod_pocketDim.LinkData;
import StevenDimDoors.mod_pocketDim.helpers.DungeonHelper;
@ -56,9 +57,9 @@ public class CommandCreateDungeonRift extends DDCommandBase
else
{
DungeonGenerator result;
int x = (int) sender.posX;
int y = (int) sender.posY;
int z = (int) sender.posZ;
int x = MathHelper.floor_double(sender.posX);
int y = MathHelper.floor_double(sender.posY);
int z = MathHelper.floor_double (sender.posZ);
LinkData link = new LinkData(sender.worldObj.provider.dimensionId, 0, x, y + 1, z, x, y + 1, z, true, 3);
if (command[0].equals("random"))

View file

@ -338,7 +338,7 @@ public class DungeonSchematic extends Schematic {
{
sideLink.destDimID = randomLink.locDimID;
}
sideLink.destYCoord = yCoordHelper.getFirstUncovered(sideLink.destDimID, linkDestination.getX(), 10, linkDestination.getZ());
sideLink.destYCoord = yCoordHelper.getFirstUncovered(sideLink.destDimID, linkDestination.getX(), linkDestination.getY(), linkDestination.getZ())-1;
if (sideLink.destYCoord < 5)
{
@ -347,7 +347,7 @@ public class DungeonSchematic extends Schematic {
sideLink.linkOrientation = world.getBlockMetadata(linkDestination.getX(), linkDestination.getY() - 1, linkDestination.getZ());
dimHelper.instance.createLink(sideLink);
dimHelper.instance.createLink(sideLink.destDimID ,
/**dimHelper.instance.createLink(sideLink.destDimID ,
sideLink.locDimID,
sideLink.destXCoord,
sideLink.destYCoord,
@ -356,6 +356,7 @@ public class DungeonSchematic extends Schematic {
sideLink.locYCoord,
sideLink.locZCoord,
BlockRotator.transformMetadata(sideLink.linkOrientation, 2, Block.doorWood.blockID));
**/
if (world.getBlockId(linkDestination.getX(), linkDestination.getY() - 3, linkDestination.getZ()) == properties.FabricBlockID)
{

View file

@ -246,6 +246,79 @@ public class BlockRotator
break;
}
}
else if (blockID==Block.signWall.blockID)
{
switch (metadata)
{
case 3:
metadata = 4;
break;
case 2:
metadata = 5;
break;
case 4:
metadata = 2;
break;
case 5:
metadata = 3;
break;
}
}
else if (blockID==Block.signPost.blockID)
{
switch (metadata)
{
case 0:
metadata = 4;
break;
case 1:
metadata = 5;
break;
case 2:
metadata = 6;
break;
case 3:
metadata = 7;
break;
case 4:
metadata = 8;
break;
case 5:
metadata = 9;
break;
case 6:
metadata = 10;
break;
case 7:
metadata = 11;
break;
case 8:
metadata = 12;
break;
case 9:
metadata = 13;
break;
case 10:
metadata = 14;
break;
case 11:
metadata = 15;
break;
case 12:
metadata = 0;
break;
case 13:
metadata = 1;
break;
case 14:
metadata = 2;
break;
case 15:
metadata = 3;
break;
}
}
else if(blockID== Block.lever.blockID||blockID== Block.stoneButton.blockID||blockID== Block.woodenButton.blockID||blockID== Block.torchWood.blockID||blockID== Block.torchRedstoneIdle.blockID||blockID== Block.torchRedstoneActive.blockID)
{
switch (metadata)