Fixed doors on top of doors with rift sig
Signed-off-by: StevenRS11 <stevenrs11@aol.com>
This commit is contained in:
@@ -25,7 +25,7 @@ public class DimData implements Serializable
|
|||||||
public boolean hasBeenFilled=false;
|
public boolean hasBeenFilled=false;
|
||||||
public boolean hasDoor=false;
|
public boolean hasDoor=false;
|
||||||
public boolean isDimRandomRift=false;
|
public boolean isDimRandomRift=false;
|
||||||
|
//public boolean isPrivatePocket = false;
|
||||||
public HashMap<Integer, HashMap<Integer, HashMap<Integer, LinkData>>> linksInThisDim=new HashMap();
|
public HashMap<Integer, HashMap<Integer, HashMap<Integer, LinkData>>> linksInThisDim=new HashMap();
|
||||||
HashMap<Integer, LinkData> dimX;
|
HashMap<Integer, LinkData> dimX;
|
||||||
HashMap<Integer, HashMap<Integer, LinkData>> dimY ;
|
HashMap<Integer, HashMap<Integer, LinkData>> dimY ;
|
||||||
|
|||||||
@@ -46,6 +46,11 @@ import cpw.mods.fml.relauncher.Side;
|
|||||||
|
|
||||||
public class dimHelper extends DimensionManager
|
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
|
* HashMap containing all the dims registered with DimDoors, sorted by dim ID. loaded on startup
|
||||||
* @Return
|
* @Return
|
||||||
|
|||||||
@@ -80,16 +80,35 @@ public class itemLinkSignature extends Item
|
|||||||
|
|
||||||
//System.out.println(key);
|
//System.out.println(key);
|
||||||
int offset = 2;
|
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()!=null)
|
||||||
{
|
{
|
||||||
if(par1ItemStack.getTagCompound().getBoolean("isCreated"))
|
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;
|
// checks to see if the item has a link stored, if so, it creates it
|
||||||
}
|
|
||||||
int orientation = MathHelper.floor_double((double)((par2EntityPlayer.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
|
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]);
|
dimHelper.instance.createLink(par3World.provider.dimensionId, linkCoords[3], par4, par5+offset, par6, linkCoords[0], linkCoords[1], linkCoords[2],linkCoords[4]);
|
||||||
dimHelper.instance.createLink(linkCoords[3], par3World.provider.dimensionId, linkCoords[0], linkCoords[1], linkCoords[2],par4, par5+offset, par6,orientation);
|
dimHelper.instance.createLink(linkCoords[3], par3World.provider.dimensionId, linkCoords[0], linkCoords[1], linkCoords[2],par4, par5+offset, par6,orientation);
|
||||||
@@ -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;
|
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.
|
//otherwise, it creates the first half of the link. Next click will complete it.
|
||||||
key= dimHelper.instance.createUniqueInterDimLinkKey();
|
key= dimHelper.instance.createUniqueInterDimLinkKey();
|
||||||
this.writeToNBT(par1ItemStack, par4, par5+offset, par6,par3World.provider.dimensionId,orientation);
|
this.writeToNBT(par1ItemStack, par4, par5+offset, par6,par3World.provider.dimensionId,orientation);
|
||||||
|
|||||||
Reference in New Issue
Block a user