diff --git a/StevenDimDoors/mod_pocketDim/DungeonGenerator.java b/StevenDimDoors/mod_pocketDim/DungeonGenerator.java index efb5601..3fac097 100644 --- a/StevenDimDoors/mod_pocketDim/DungeonGenerator.java +++ b/StevenDimDoors/mod_pocketDim/DungeonGenerator.java @@ -182,7 +182,15 @@ public class DungeonGenerator implements Serializable } catch(Exception e) { - dungeon = mod_pocketDim.registeredDungeons.get(rand.nextInt(mod_pocketDim.registeredDungeons.size())); + if(mod_pocketDim.registeredDungeons.size()>0) + { + dungeon = mod_pocketDim.registeredDungeons.get(rand.nextInt(mod_pocketDim.registeredDungeons.size())); + } + else + { + e.printStackTrace(); + return; + } } diff --git a/StevenDimDoors/mod_pocketDim/SchematicLoader.java b/StevenDimDoors/mod_pocketDim/SchematicLoader.java index 494241d..5bd69df 100644 --- a/StevenDimDoors/mod_pocketDim/SchematicLoader.java +++ b/StevenDimDoors/mod_pocketDim/SchematicLoader.java @@ -33,20 +33,25 @@ public class SchematicLoader public short height; public short length; - public short[] blocks; - public byte[] blockData; + public short[] blocks= new short[0]; + public byte[] blockData= new byte[0]; + public byte[] blockId =new byte[0]; + public byte[] addId = new byte[0]; - public byte[] blockId; + public NBTTagList entities; public NBTTagList tileentities; + private Random rand = new Random(); - // public World world; + public Point3D incomingLink= new Point3D(0,0,0); + public ArrayList sideLinks = new ArrayList(); public ArrayList exitLinks = new ArrayList(); + public int transMeta; - // public Chunk chunk; + public int cX; public int cZ; public int cY; @@ -58,7 +63,6 @@ public class SchematicLoader public SchematicLoader() { - // this.schematic="/schematics/"+filePath; } @@ -85,28 +89,25 @@ public class SchematicLoader } //FileInputStream fileinputstream = new FileInputStream(file); NBTTagCompound nbtdata = CompressedStreamTools.readCompressed(input); - - - - width = nbtdata.getShort("Width"); - height = nbtdata.getShort("Height"); - length = nbtdata.getShort("Length"); - - - blockId = nbtdata.getByteArray("Blocks"); - blockData = nbtdata.getByteArray("Data"); + + width = nbtdata.getShort("Width"); + height = nbtdata.getShort("Height"); + length = nbtdata.getShort("Length"); + + blockId = nbtdata.getByteArray("Blocks"); + blockData = nbtdata.getByteArray("Data"); blocks=new short[blockId.length]; - if(nbtdata.getByteArray("AddBlocks")!=null) - { - this.addId = nbtdata.getByteArray("AddBlocks"); - } + addId = nbtdata.getByteArray("AddBlocks"); - entities = nbtdata.getTagList("Entities"); - tileentities = nbtdata.getTagList("TileEntities"); - this.didRead=true; - input.close(); + entities = nbtdata.getTagList("Entities"); + tileentities = nbtdata.getTagList("TileEntities"); + + + + this.didRead=true; + input.close(); for (int index = 0; index < blockId.length; index++) @@ -114,14 +115,14 @@ public class SchematicLoader if ((index >> 1) >= addId.length) { blocks[index] = (short) (blockId[index] & 0xFF); - } - else + } + else { if ((index & 1) == 0) { blocks[index] = (short) (((addId[index >> 1] & 0x0F) << 8) + (blockId[index] & 0xFF)); - - } else + } + else { blocks[index] = (short) (((addId[index >> 1] & 0xF0) << 4) + (blockId[index] & 0xFF)); } @@ -769,7 +770,7 @@ public class SchematicLoader if(Block.blocksList[blockToReplace]==null&&blockToReplace!=0||blockToReplace>158) { - // blockToReplace=mod_pocketDim.blockDimWall.blockID; + blockToReplace=mod_pocketDim.blockDimWall.blockID; } if(blockToReplace>0) diff --git a/StevenDimDoors/mod_pocketDim/mod_pocketDim.java b/StevenDimDoors/mod_pocketDim/mod_pocketDim.java index b62f7e7..053af60 100644 --- a/StevenDimDoors/mod_pocketDim/mod_pocketDim.java +++ b/StevenDimDoors/mod_pocketDim/mod_pocketDim.java @@ -612,7 +612,7 @@ public class mod_pocketDim this.blocksImmuneToRift.add(Block.blockLapis.blockID); this.blocksImmuneToRift.add(Block.bedrock.blockID); - /** + this.hubs.add(new DungeonGenerator(0, "/schematics/4WayBasicHall.schematic", false)); this.hubs.add(new DungeonGenerator(0, "/schematics/4WayBasicHall.schematic", false)); this.hubs.add(new DungeonGenerator(0, "/schematics/doorTotemRuins.schematic", true)); @@ -690,7 +690,7 @@ public class mod_pocketDim this.registeredDungeons.addAll(this.hubs); -**/ + diff --git a/resources/mods/DimDoors/textures/blocks/blockDimWallPerm.png b/resources/mods/DimDoors/textures/blocks/blockDimWallPerm.png index 4967de8..c8f4daf 100644 Binary files a/resources/mods/DimDoors/textures/blocks/blockDimWallPerm.png and b/resources/mods/DimDoors/textures/blocks/blockDimWallPerm.png differ diff --git a/resources/mods/DimDoors/textures/blocks/blockDimWallPerm.txt b/resources/mods/DimDoors/textures/blocks/blockDimWallPerm.txt new file mode 100644 index 0000000..53c921e --- /dev/null +++ b/resources/mods/DimDoors/textures/blocks/blockDimWallPerm.txt @@ -0,0 +1 @@ +0*7,1*7,2*7,3*7,4*7,5*7,6*7,5*7,4*7,3*7,2*7,1*7 \ No newline at end of file