Fixed doors on top of doors with rift sig

Signed-off-by: StevenRS11 <stevenrs11@aol.com>
This commit is contained in:
StevenRS11
2013-05-04 18:58:51 -04:00
parent 89ed9dce94
commit 815dfdc15d
3 changed files with 33 additions and 12 deletions

View File

@@ -25,7 +25,7 @@ public class DimData implements Serializable
public boolean hasBeenFilled=false;
public boolean hasDoor=false;
public boolean isDimRandomRift=false;
//public boolean isPrivatePocket = false;
public HashMap<Integer, HashMap<Integer, HashMap<Integer, LinkData>>> linksInThisDim=new HashMap();
HashMap<Integer, LinkData> dimX;
HashMap<Integer, HashMap<Integer, LinkData>> dimY ;

View File

@@ -46,6 +46,11 @@ import cpw.mods.fml.relauncher.Side;
public class dimHelper extends DimensionManager
{
/**
* hashMap for the private pocket dimensions
*/
public static HashMap<String, DimData> privatePockets = new HashMap<String, DimData>();
/**
* HashMap containing all the dims registered with DimDoors, sorted by dim ID. loaded on startup
* @Return

View File

@@ -80,15 +80,34 @@ public class itemLinkSignature extends Item
//System.out.println(key);
int offset = 2;
if(par3World.getBlockId(par4, par5, par6)==Block.snow.blockID)
{
offset = 1;
}
if(par3World.getBlockId(par4, par5, par6)==mod_pocketDim.dimDoorID&&par3World.getBlockId(par4, par5+1, par6)==mod_pocketDim.dimDoorID)
{
offset = 1;
}
if(par3World.getBlockId(par4, par5, par6)==mod_pocketDim.ExitDoorID&&par3World.getBlockId(par4, par5+1, par6)==mod_pocketDim.ExitDoorID)
{
offset = 1;
}
if(par3World.getBlockId(par4, par5, par6)==mod_pocketDim.dimDoorID&&par3World.getBlockId(par4, par5-1, par6)==mod_pocketDim.dimDoorID)
{
offset = 0;
}
if(par3World.getBlockId(par4, par5, par6)==mod_pocketDim.ExitDoorID&&par3World.getBlockId(par4, par5-1, par6)==mod_pocketDim.ExitDoorID)
{
offset = 0;
}
if(par1ItemStack.getTagCompound()!=null)
{
if(par1ItemStack.getTagCompound().getBoolean("isCreated"))
{
// checks to see if the item has a link stored, if so, it creates it
if(par3World.getBlockId(par4, par5, par6)==Block.snow.blockID)
{
offset = 1;
}
int orientation = MathHelper.floor_double((double)((par2EntityPlayer.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
dimHelper.instance.createLink(par3World.provider.dimensionId, linkCoords[3], par4, par5+offset, par6, linkCoords[0], linkCoords[1], linkCoords[2],linkCoords[4]);
@@ -112,10 +131,7 @@ public class itemLinkSignature extends Item
{
int orientation = MathHelper.floor_double((double)((par2EntityPlayer.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
if(par3World.getBlockId(par4, par5, par6)==Block.snow.blockID)
{
offset = 1;
}
//otherwise, it creates the first half of the link. Next click will complete it.
key= dimHelper.instance.createUniqueInterDimLinkKey();
this.writeToNBT(par1ItemStack, par4, par5+offset, par6,par3World.provider.dimensionId,orientation);