diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/DDLoot.java b/src/main/java/StevenDimDoors/mod_pocketDim/DDLoot.java index d8045b6e..225ebdf2 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/DDLoot.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/DDLoot.java @@ -49,9 +49,13 @@ public class DDLoot { addContent(true, items, Item.diamond.itemID, 40, 1, 2); addContent(true, items, Item.emerald.itemID, 20, 1, 2); addContent(true, items, Item.appleGold.itemID, 10); + addContent(true, items, Item.nameTag.itemID, 15); + addContent(true, items, Item.eyeOfEnder.itemID, 15); + addContent(true, items, Item.ghastTear.itemID, 15); addContent(properties.FabricOfRealityLootEnabled, items, mod_pocketDim.blockDimWall.blockID, 80, 4, 16); - addContent(properties.WorldThreadLootEnabled, items, mod_pocketDim.itemWorldThread.itemID, 80); + addContent(properties.WorldThreadLootEnabled, items, mod_pocketDim.itemWorldThread.itemID, 90, 1,2); + // Add all the items to our dungeon chest addItemsToContainer(DungeonChestInfo, items); diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/blocks/BaseDimDoor.java b/src/main/java/StevenDimDoors/mod_pocketDim/blocks/BaseDimDoor.java index 139b00d3..3233c6eb 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/blocks/BaseDimDoor.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/blocks/BaseDimDoor.java @@ -63,24 +63,23 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { - int var10 = this.getFullMetadata(world, x, y, z); - int var11 = var10 & 7; - var11 ^= 4; + int var10 = this.getFullMetadata(world, x, y, z); + int var11 = var10 & 7; + var11 ^= 4; - if ((var10 & 8) == 0) - { - world.setBlockMetadataWithNotify(x, y, z, var11,2); - world.markBlockRangeForRenderUpdate(x, y, z, x, y, z); - } - else - { - world.setBlockMetadataWithNotify(x, y - 1, z, var11,2); - world.markBlockRangeForRenderUpdate(x, y - 1, z, x, y, z); - } - - world.playAuxSFXAtEntity(player, 1003, x, y, z, 0); - return true; + if ((var10 & 8) == 0) + { + world.setBlockMetadataWithNotify(x, y, z, var11,2); + world.markBlockRangeForRenderUpdate(x, y, z, x, y, z); + } + else + { + world.setBlockMetadataWithNotify(x, y - 1, z, var11,2); + world.markBlockRangeForRenderUpdate(x, y - 1, z, x, y, z); + } + world.playAuxSFXAtEntity(player, 1003, x, y, z, 0); + return true; } @Override diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/blocks/BlockRift.java b/src/main/java/StevenDimDoors/mod_pocketDim/blocks/BlockRift.java index e438bccc..85719c39 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/blocks/BlockRift.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/blocks/BlockRift.java @@ -43,6 +43,7 @@ public class BlockRift extends Block implements ITileEntityProvider private static final int BLOCK_SEARCH_CHANCE = 50; private static final int MAX_BLOCK_DESTRUCTION_CHANCE = 100; private static final int BLOCK_DESTRUCTION_CHANCE = 50; + private static final int WORLD_THREAD_PROBABILITY = 10; private final DDProperties properties; private final ArrayList blocksImmuneToRift; @@ -208,7 +209,7 @@ public class BlockRift extends Block implements ITileEntityProvider { return; } - if(worldObj.rand.nextInt(7)==0) + if(worldObj.rand.nextInt(100) history = DungeonHelper.getDungeonChainHistory(dimension.parent(), this, maxSearchLength); + ArrayList history = DungeonHelper.getDungeonChainHistory(dimension, this, maxSearchLength); return getNextDungeon(history, random); } diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java b/src/main/java/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java index ac5b191d..3f8e7a3b 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java @@ -615,9 +615,12 @@ public class DungeonHelper { throw new IllegalArgumentException("dimension cannot be null."); } - + if(dimension.parent()==null) + { + return new ArrayList(); + } int count = 0; - NewDimData tail = dimension; + NewDimData tail = dimension.parent(); DungeonData dungeon = tail.dungeon(); ArrayList history = new ArrayList(); diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/world/gateways/BaseGateway.java b/src/main/java/StevenDimDoors/mod_pocketDim/world/gateways/BaseGateway.java index 86629276..9dfae595 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/world/gateways/BaseGateway.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/world/gateways/BaseGateway.java @@ -73,8 +73,7 @@ public abstract class BaseGateway this.generateRandomBits(world, x, y, z); DimLink link = PocketManager.getDimensionData(world).createLink(x, y + 1, z, LinkTypes.DUNGEON, orientation); - NewDimData data = PocketManager.registerPocket(PocketManager.getDimensionData(world), true); - PocketBuilder.generateSelectedDungeonPocket(link, mod_pocketDim.properties, this.getStartingDungeon(data,world.rand)); + PocketBuilder.generateSelectedDungeonPocket(link, mod_pocketDim.properties, this.getStartingDungeon(PocketManager.getDimensionData(world),world.rand)); return true; }