diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/schematic/Schematic.java b/src/main/java/StevenDimDoors/mod_pocketDim/schematic/Schematic.java index df75141..170b9ea 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/schematic/Schematic.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/schematic/Schematic.java @@ -155,7 +155,9 @@ public class Schematic { } catch (Exception ex) { + ex.printStackTrace(); throw new InvalidSchematicException("The schematic could not be decoded."); + } //load size of schematic to generate @@ -377,7 +379,10 @@ public class Schematic { for (dx = 0; dx < width; dx++) { //In the future, we might want to make this more efficient by building whole chunks at a time - setBlockDirectly(world, x + dx, y + dy, z + dz, blocks[index], metadata[index]); + if(blocks[index]!=0) + { + setBlockDirectly(world, x + dx, y + dy, z + dz, blocks[index], metadata[index]); + } index++; } } 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 d90e34a..c1ede13 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/world/gateways/BaseGateway.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/world/gateways/BaseGateway.java @@ -15,6 +15,7 @@ import StevenDimDoors.mod_pocketDim.schematic.InvalidSchematicException; import StevenDimDoors.mod_pocketDim.schematic.Schematic; import StevenDimDoors.mod_pocketDim.schematic.SchematicFilter; import StevenDimDoors.mod_pocketDim.world.PocketBuilder; +import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; @@ -44,6 +45,16 @@ public abstract class BaseGateway */ public boolean generate(World world, int x, int y, int z) { + /** + * We have two cases here. The gateway may or may not specify a schematic to load from. If it does, we need to line up the door in the schematic with the given rift. + * I tried doing this by taking the difference between the selected coords for the door, and the position of the door relative to the bounds of the .schematic, + * but it doesnt work. It seems like it should, though. Odd. + * + * The other issue is with the .schematic itself. It looks like we are exporting quite a few air blocks with the real blocks. + * This may be a limitation of our export function, as it wasnt really meant for this. I added a line in the generate function to skip air blocks completely. + * Should also speed up generation time. + * + */ Point3D doorLocation= new Point3D(0,0,0); int orientation = 0; try @@ -56,6 +67,12 @@ public abstract class BaseGateway orientation = filter.getEntranceOrientation(); schematic.copyToWorld(world, x-doorLocation.getX(), y-doorLocation.getY(), z-doorLocation.getZ()); + for(int c = 0; c<240; c++) + { + world.setBlock(x-doorLocation.getX(), y-doorLocation.getY()+c, z-doorLocation.getZ(),Block.glowStone.blockID); + + } + } } catch (Exception e) diff --git a/src/main/resources/schematics/balgor.txt b/src/main/resources/schematics/balgor.txt new file mode 100644 index 0000000..b9d8157 --- /dev/null +++ b/src/main/resources/schematics/balgor.txt @@ -0,0 +1,6 @@ +/schematics/balgor/ComplexHall_GardenBalgor1_open_39.schematic +/schematics/balgor/ComplexHall_OpenHallBalgor1_Closed_68.schematic +/schematics/balgor/ComplexHall_SilverEggHallBalgor1_closed_25.schematic +/schematics/balgor/Maze_OmniMazeBalgor1_open_30.schematic +/schematics/balgor/Trap_ArrowTrapBalgor1_closed_20.schematic +/schematics/balgor/Trap_ZombieHallBalgor1_closed_25.schematic diff --git a/src/main/resources/schematics/balgor/ComplexHall_GardenBalgor1_open_39.schematic b/src/main/resources/schematics/balgor/ComplexHall_GardenBalgor1_open_39.schematic new file mode 100644 index 0000000..fd5f926 Binary files /dev/null and b/src/main/resources/schematics/balgor/ComplexHall_GardenBalgor1_open_39.schematic differ diff --git a/src/main/resources/schematics/balgor/ComplexHall_OpenHallBalgor1_Closed_68.schematic b/src/main/resources/schematics/balgor/ComplexHall_OpenHallBalgor1_Closed_68.schematic new file mode 100644 index 0000000..19be9c4 Binary files /dev/null and b/src/main/resources/schematics/balgor/ComplexHall_OpenHallBalgor1_Closed_68.schematic differ diff --git a/src/main/resources/schematics/balgor/ComplexHall_SilverEggHallBalgor1_closed_25.schematic b/src/main/resources/schematics/balgor/ComplexHall_SilverEggHallBalgor1_closed_25.schematic new file mode 100644 index 0000000..270f035 Binary files /dev/null and b/src/main/resources/schematics/balgor/ComplexHall_SilverEggHallBalgor1_closed_25.schematic differ diff --git a/src/main/resources/schematics/balgor/Maze_OmniMazeBalgor1_open_30.schematic b/src/main/resources/schematics/balgor/Maze_OmniMazeBalgor1_open_30.schematic new file mode 100644 index 0000000..bffcbcf Binary files /dev/null and b/src/main/resources/schematics/balgor/Maze_OmniMazeBalgor1_open_30.schematic differ diff --git a/src/main/resources/schematics/balgor/Trap_ArrowTrapBalgor1_closed_20.schematic b/src/main/resources/schematics/balgor/Trap_ArrowTrapBalgor1_closed_20.schematic new file mode 100644 index 0000000..8ef105c Binary files /dev/null and b/src/main/resources/schematics/balgor/Trap_ArrowTrapBalgor1_closed_20.schematic differ diff --git a/src/main/resources/schematics/balgor/Trap_ZombieHallBalgor1_closed_25.schematic b/src/main/resources/schematics/balgor/Trap_ZombieHallBalgor1_closed_25.schematic new file mode 100644 index 0000000..b968f0d Binary files /dev/null and b/src/main/resources/schematics/balgor/Trap_ZombieHallBalgor1_closed_25.schematic differ diff --git a/src/main/resources/schematics/balgor/rules.txt b/src/main/resources/schematics/balgor/rules.txt new file mode 100644 index 0000000..bb4d683 --- /dev/null +++ b/src/main/resources/schematics/balgor/rules.txt @@ -0,0 +1,23 @@ +Version 1 +Types: +Trap +ComplexHall +Maze + +Settings: +AllowDuplicatesInChain = false +AllowPackChangeOut = false +DistortDoorCoordinates = true + +## Prevent this pack from being selected for transitioning in once we've transitioned out +AllowPackChangeIn = true + +Rules: + +? ? ? -> + +? ? -> Maze#20 ComplexHall#40 Trap#40 + +? -> ComplexHall#40 Trap#60 + +->ComplexHall#100 \ No newline at end of file diff --git a/src/main/resources/schematics/gateways/twoPillars.schematic b/src/main/resources/schematics/gateways/twoPillars.schematic index 64f157c..0e17b25 100644 Binary files a/src/main/resources/schematics/gateways/twoPillars.schematic and b/src/main/resources/schematics/gateways/twoPillars.schematic differ diff --git a/src/main/resources/schematics/ruins.txt b/src/main/resources/schematics/ruins.txt index cb68400..b736518 100644 --- a/src/main/resources/schematics/ruins.txt +++ b/src/main/resources/schematics/ruins.txt @@ -79,3 +79,7 @@ /schematics/ruins/Trap_SK-TrappedStairsUp_Closed_50.schematic /schematics/ruins/Trap_SK-UTrapRight_Open_50.schematic /schematics/ruins/trap_wallFallcomboPistonHall_closed_200.schematic +/schematics/ruins/DeadEnd_Floating-Altar_Open_100.schematic + + +DeadEnd_Floating-Altar_Open diff --git a/src/main/resources/schematics/ruins/DeadEnd_Floating-Altar_Open_100.schematic b/src/main/resources/schematics/ruins/DeadEnd_Floating-Altar_Open_100.schematic new file mode 100644 index 0000000..fa5b3c0 Binary files /dev/null and b/src/main/resources/schematics/ruins/DeadEnd_Floating-Altar_Open_100.schematic differ