diff --git a/build.gradle b/build.gradle index cbf6ca32..26e91ea6 100644 --- a/build.gradle +++ b/build.gradle @@ -161,7 +161,7 @@ jar.finalizedBy('reobfJar') sourceSets.main.resources { srcDir 'src/generated/resources' - srcDir 'api/main/java' + srcDir 'src/api/java' } publishing { diff --git a/api/main/java/wayoftime/bloodmagic/api/IBloodMagicAPI.java b/src/api/java/wayoftime/bloodmagic/api/IBloodMagicAPI.java similarity index 100% rename from api/main/java/wayoftime/bloodmagic/api/IBloodMagicAPI.java rename to src/api/java/wayoftime/bloodmagic/api/IBloodMagicAPI.java diff --git a/api/main/java/wayoftime/bloodmagic/api/IBloodMagicRecipeRegistrar.java b/src/api/java/wayoftime/bloodmagic/api/IBloodMagicRecipeRegistrar.java similarity index 100% rename from api/main/java/wayoftime/bloodmagic/api/IBloodMagicRecipeRegistrar.java rename to src/api/java/wayoftime/bloodmagic/api/IBloodMagicRecipeRegistrar.java diff --git a/api/main/java/wayoftime/bloodmagic/api/IBloodMagicValueManager.java b/src/api/java/wayoftime/bloodmagic/api/IBloodMagicValueManager.java similarity index 100% rename from api/main/java/wayoftime/bloodmagic/api/IBloodMagicValueManager.java rename to src/api/java/wayoftime/bloodmagic/api/IBloodMagicValueManager.java diff --git a/api/main/java/wayoftime/bloodmagic/api/SerializerHelper.java b/src/api/java/wayoftime/bloodmagic/api/SerializerHelper.java similarity index 100% rename from api/main/java/wayoftime/bloodmagic/api/SerializerHelper.java rename to src/api/java/wayoftime/bloodmagic/api/SerializerHelper.java diff --git a/src/main/java/wayoftime/bloodmagic/structures/Dungeon.java b/src/main/java/wayoftime/bloodmagic/structures/Dungeon.java index 486d0300..226490db 100644 --- a/src/main/java/wayoftime/bloodmagic/structures/Dungeon.java +++ b/src/main/java/wayoftime/bloodmagic/structures/Dungeon.java @@ -10,7 +10,6 @@ import java.util.Random; import org.apache.commons.lang3.tuple.Pair; -import net.minecraft.block.Blocks; import net.minecraft.util.Direction; import net.minecraft.util.Mirror; import net.minecraft.util.Rotation; @@ -29,10 +28,10 @@ public class Dungeon Map> availableDoorMap = new HashMap<>(); // Map of doors. The EnumFacing indicates // what way this door faces. List descriptorList = new ArrayList<>(); -// Map> roomMap = new HashMap<>(); // Placement positions in terms + Map> roomMap = new HashMap<>(); // Placement positions in terms // // of actual positions - List>> roomList = new ArrayList<>(); +// List>> roomList = new ArrayList<>(); PlacementSettings settings = new PlacementSettings(); Mirror mir = Mirror.NONE; @@ -58,12 +57,12 @@ public class Dungeon // BlockPos blockpos2 = blockpos.add(this.position); // p_242689_3_.func_237144_a_(p_242689_1_, blockpos2, placementsettings, func_214074_b(this.seed)); - List rotationInfo = new ArrayList(); +// List rotationInfo = new ArrayList(); - int n = 1; +// int n = 1; DungeonRoom room = getRandomRoom(rand); -// roomMap.put(pos, Pair.of(room, settings.copy())); - roomList.add(Pair.of(pos, Pair.of(room, settings.copy()))); + roomMap.put(pos, Pair.of(room, settings.copy())); +// roomList.add(Pair.of(pos, Pair.of(room, settings.copy()))); descriptorList.addAll(room.getAreaDescriptors(settings, pos)); for (Direction facing : Direction.values()) { @@ -78,7 +77,7 @@ public class Dungeon } } - rotationInfo.add(settings.getRotation()); +// rotationInfo.add(settings.getRotation()); // Initial AreaDescriptors and door positions are initialized. Time for fun! for (int i = 0; i < 100; i++) @@ -133,22 +132,22 @@ public class Dungeon } } -// roomMap.put(roomLocation, Pair.of(testingRoom, settings.copy())); - roomList.add(Pair.of(roomLocation, Pair.of(testingRoom, settings.copy()))); + roomMap.put(roomLocation, Pair.of(testingRoom, settings.copy())); +// roomList.add(Pair.of(roomLocation, Pair.of(testingRoom, settings.copy()))); descriptorList.addAll(descriptors); removedDoor1 = Pair.of(doorFacing, availableDoor); removedDoor2 = Pair.of(oppositeDoorFacing, testDoor.add(roomLocation)); room = testingRoom; - n++; - rotationInfo.add(randRotation); - System.out.println("Placement: " + n); - - for (Direction facing : Direction.values()) - { - List testingDoorList = testingRoom.getDoorOffsetsForFacing(settings, facing, BlockPos.ZERO); - System.out.println("Door Facing: " + facing + ", Door List: " + testingDoorList); - } +// n++; +// rotationInfo.add(randRotation); +// System.out.println("Placement: " + n); +// +// for (Direction facing : Direction.values()) +// { +// List testingDoorList = testingRoom.getDoorOffsetsForFacing(settings, facing, BlockPos.ZERO); +// System.out.println("Door Facing: " + facing + ", Door List: " + testingDoorList); +// } break testDirection; } @@ -197,24 +196,24 @@ public class Dungeon BMLog.DEBUG.info("Duration: " + duration + "(ns), " + duration / 1000000 + "(ms)"); // Building what I've got - n = 0; -// for (Entry> entry : roomMap.entrySet()) - for (Pair> entry : roomList) +// n = 0; + for (Entry> entry : roomMap.entrySet()) +// for (Pair> entry : roomList) { - n++; +// n++; BlockPos placementPos = entry.getKey(); DungeonRoom placedRoom = entry.getValue().getKey(); PlacementSettings placementSettings = entry.getValue().getValue(); placedRoom.placeStructureAtPosition(rand, placementSettings, world, placementPos); - world.setBlockState(placementPos, Blocks.REDSTONE_BLOCK.getDefaultState(), 3); - System.out.println("Supposed Rotation for " + n + ": " + rotationInfo.get(n - 1)); - System.out.println("Placement: " + n + ", BlockPos: " + placementPos + ", Rotation: " + placementSettings.getRotation()); +// world.setBlockState(placementPos, Blocks.REDSTONE_BLOCK.getDefaultState(), 3); +// System.out.println("Supposed Rotation for " + n + ": " + rotationInfo.get(n - 1)); +// System.out.println("Placement: " + n + ", BlockPos: " + placementPos + ", Rotation: " + placementSettings.getRotation()); } // System.out.println(roomMap.size()); - System.out.println(roomList.size()); +// System.out.println(roomList.size()); return false; } diff --git a/src/main/resources/assets/bloodmagic/schematics/four_way_corridor.json b/src/main/resources/assets/bloodmagic/schematics/four_way_corridor.json index 620a3d0f..6e3e792f 100644 --- a/src/main/resources/assets/bloodmagic/schematics/four_way_corridor.json +++ b/src/main/resources/assets/bloodmagic/schematics/four_way_corridor.json @@ -1,5 +1,5 @@ { - "dungeonWeight": 4, + "dungeonWeight": 2, "structureMap": { "bloodmagic:four_way_corridor": { "x": 0, diff --git a/src/main/resources/assets/bloodmagic/schematics/ore_hold_1.json b/src/main/resources/assets/bloodmagic/schematics/ore_hold_1.json index 42d9f1a6..ec51994a 100644 --- a/src/main/resources/assets/bloodmagic/schematics/ore_hold_1.json +++ b/src/main/resources/assets/bloodmagic/schematics/ore_hold_1.json @@ -1,5 +1,5 @@ { - "dungeonWeight": 8, + "dungeonWeight": 4, "structureMap": { "bloodmagic:ore_hold_1": { "x": 0, diff --git a/src/main/resources/assets/bloodmagic/schematics/overlapped_corridor.json b/src/main/resources/assets/bloodmagic/schematics/overlapped_corridor.json new file mode 100644 index 00000000..dfbd5e4a --- /dev/null +++ b/src/main/resources/assets/bloodmagic/schematics/overlapped_corridor.json @@ -0,0 +1,70 @@ +{ + "dungeonWeight": 2, + "structureMap": { + "bloodmagic:overlapped_corridor": { + "x": 0, + "y": 0, + "z": 0 + } + }, + "doorMap": { + "north": [ + { + "x": 5, + "y": 0, + "z": 0 + } + ], + "south": [ + { + "x": 5, + "y": 0, + "z": 10 + } + ], + "west": [ + { + "x": 0, + "y": 4, + "z": 5 + } + ], + "east": [ + { + "x": 10, + "y": 4, + "z": 5 + } + ] + }, + "descriptorList": [ + { + "minimumOffset": { + "x": 3, + "y": 0, + "z": 0 + }, + "maximumOffset": { + "x": 8, + "y": 5, + "z": 11 + }, + "blockPosCache": [], + "cache": true + }, + { + "minimumOffset": { + "x": 0, + "y": 4, + "z": 3 + }, + "maximumOffset": { + "x": 11, + "y": 9, + "z": 8 + }, + "blockPosCache": [], + "cache": true + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/schematics.json b/src/main/resources/assets/bloodmagic/schematics/schematics.json index 309877d8..a1915c05 100644 --- a/src/main/resources/assets/bloodmagic/schematics/schematics.json +++ b/src/main/resources/assets/bloodmagic/schematics/schematics.json @@ -1,3 +1,7 @@ [ - "bloodmagic:t_corridor" + "bloodmagic:t_corridor", + "bloodmagic:four_way_corridor_loot", + "bloodmagic:four_way_corridor", + "bloodmagic:ore_hold_1", + "bloodmagic:straight_corridor" ] \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/spiral_staircase.json b/src/main/resources/assets/bloodmagic/schematics/spiral_staircase.json new file mode 100644 index 00000000..31eda76a --- /dev/null +++ b/src/main/resources/assets/bloodmagic/schematics/spiral_staircase.json @@ -0,0 +1,81 @@ +{ + "dungeonWeight": 4, + "structureMap": { + "bloodmagic:spiral_staircase": { + "x": 0, + "y": 0, + "z": 0 + } + }, + "doorMap": { + "north": [ + { + "x": 5, + "y": 0, + "z": 0 + }, + { + "x": 5, + "y": 12, + "z": 0 + } + ], + "south": [ + { + "x": 5, + "y": 0, + "z": 14 + }, + { + "x": 5, + "y": 12, + "z": 10 + } + ], + "west": [ + { + "x": 0, + "y": 0, + "z": 5 + }, + { + "x": 0, + "y": 12, + "z": 5 + } + ], + "east": [ + { + "x": 10, + "y": 0, + "z": 5 + }, + { + "x": 10, + "y": 6, + "z": 5 + }, + { + "x": 10, + "y": 12, + "z": 5 + } + ] + }, + "descriptorList": [ + { + "minimumOffset": { + "x": 0, + "y": 0, + "z": 0 + }, + "maximumOffset": { + "x": 11, + "y": 18, + "z": 11 + }, + "blockPosCache": [], + "cache": true + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/straight_corridor.json b/src/main/resources/assets/bloodmagic/schematics/straight_corridor.json index 7bfc97e8..537eee82 100644 --- a/src/main/resources/assets/bloodmagic/schematics/straight_corridor.json +++ b/src/main/resources/assets/bloodmagic/schematics/straight_corridor.json @@ -1,5 +1,5 @@ { - "dungeonWeight": 4, + "dungeonWeight": 2, "structureMap": { "bloodmagic:straight_corridor": { "x": 0, diff --git a/src/main/resources/assets/bloodmagic/schematics/t_corridor.json b/src/main/resources/assets/bloodmagic/schematics/t_corridor.json index 4fc3ec4a..6bc5f643 100644 --- a/src/main/resources/assets/bloodmagic/schematics/t_corridor.json +++ b/src/main/resources/assets/bloodmagic/schematics/t_corridor.json @@ -1,5 +1,5 @@ { - "dungeonWeight": 12, + "dungeonWeight": 2, "structureMap": { "bloodmagic:t_corridor": { "x": 0,