moved rift sigs over to use nbt data

fixed limbo inventory issues
changed rift generation on dim door placement

Signed-off-by: StevenRS11 <stevenrs11@aol.com>
This commit is contained in:
StevenRS11
2013-04-13 21:15:06 -04:00
parent 2d6d430277
commit f816e96bdb
4 changed files with 24 additions and 14 deletions

View File

@@ -38,15 +38,22 @@ public class PlayerRespawnTracker implements IPlayerTracker
if(player.worldObj.provider.dimensionId==mod_pocketDim.limboDimID)
{
if(!player.worldObj.isRemote)
if(!player.worldObj.isRemote&&mod_pocketDim.returnInventory)
{
for(EntityItem drop : mod_pocketDim.limboSpawnInventory.get(player.username))
if(player.username!=null)
{
player.inventory.addItemStackToInventory(drop.getEntityItem());
if(!mod_pocketDim.limboSpawnInventory.isEmpty()&&mod_pocketDim.limboSpawnInventory.containsKey(player.username))
{
for(EntityItem drop : mod_pocketDim.limboSpawnInventory.get(player.username))
{
player.inventory.addItemStackToInventory(drop.getEntityItem());
}
}
}

View File

@@ -247,24 +247,24 @@ public class dimDoor extends BlockContainer
{
if(!par1World.isRemote&&par1World.getBlockId(par2, par3-1, par4)==this.blockID)
{
boolean newDim=false;
if(dimHelper.instance.getLinkDataFromCoords(par2, par3, par4, par1World)==null)
{
newDim=true;
}
if(newDim)
{
LinkData link = new LinkData(par1World.provider.dimensionId, 0, par2, par3, par4, par2, par3, par4, true);
link.linkOrientation= par1World.getBlockMetadata(par2, par3-1, par4);
dimHelper.instance.createPocket(link,true, false);
// System.out.println(link.linkOrientation);
LinkData link = new LinkData(par1World.provider.dimensionId, 0, par2, par3, par4, par2, par3, par4, true);
link.linkOrientation= par1World.getBlockMetadata(par2, par3-1, par4);
dimHelper.instance.createPocket(link,true, false);
// System.out.println(link.linkOrientation);
}
if(dimHelper.instance.getLinkDataFromCoords(par2, par3, par4, par1World)!=null)
{
dimHelper.instance.getLinkDataFromCoords(par2, par3, par4, par1World).linkOrientation=par1World.getBlockMetadata(par2, par3-1, par4);

View File

@@ -139,7 +139,7 @@ public class itemLinkSignature extends Item
{
Integer[] coords = this.readFromNBT(par1ItemStack);
par3List.add(String.valueOf("Leads to dim "+coords[3] +" with depth "+dimHelper.instance.getDimDepth(dimHelper.instance.getDimDepth(coords[3]))));
par3List.add("at x="+coords[0]+" y="+coords[1]+" z="+coords[3]);
par3List.add("at x="+coords[0]+" y="+coords[1]+" z="+coords[2]);
}

View File

@@ -56,7 +56,7 @@ public class mod_pocketDim
{
public static final String version = "1.5.1R1.3.3RC2";
public static final String version = "1.5.1R1.3.3RC3";
public static final String modid = "DimensionalDoors";
//need to clean up
@@ -190,6 +190,7 @@ public class mod_pocketDim
public static boolean hardcoreLimbo;
public static boolean returnInventory;
public static boolean hasInitDims=false;
@@ -243,6 +244,8 @@ public class mod_pocketDim
this.enableUnstableDoor = config.get("BOOLEAN", "true to enable unstable door crafting", true).getBoolean(true);
this.enableWoodenDimDoor = config.get("BOOLEAN", "true to enable wooden door crafting", true).getBoolean(true);
this.enableDoorOpenGL = config.get("BOOLEAN", "Toggles the door render effect", true).getBoolean(true);
this.returnInventory = config.get("BOOLEAN", "Toggles whether or not your inventory is returned upon dying and respawning in limbo", true).getBoolean(true);
// dimRailID = config.getBlock("Dimensional Rail", 1980).getInt();