From 71ba0229c5bdc8e6c2346aac2bfdf380e7590bab Mon Sep 17 00:00:00 2001 From: WayofTime Date: Sun, 15 Nov 2020 12:07:01 -0500 Subject: [PATCH] Dungeon tinkering Nothing gameplay-affecting here. --- src/generated/resources/.cache/cache | 7 +- .../bloodmagic/blockstates/dungeon_ore.json | 7 + .../assets/bloodmagic/lang/en_us.json | 1 + .../bloodmagic/models/block/dungeon_ore.json | 6 + .../bloodmagic/models/item/dungeon_ore.json | 3 + .../models/item/dungeon_tester.json | 6 + .../loot_tables/blocks/dungeon_ore.json | 19 ++ .../java/wayoftime/bloodmagic/BloodMagic.java | 2 + .../common/block/BloodMagicBlocks.java | 1 + .../common/data/GeneratorLanguage.java | 2 + .../common/item/BloodMagicItems.java | 6 + .../bloodmagic/gson/SerializerBase.java | 28 +++ .../bloodmagic/gson/Serializers.java | 128 ++++++++++++ .../bloodmagic/structures/Dungeon.java | 196 ++++++++++++++++++ .../bloodmagic/structures/DungeonRoom.java | 78 +++++++ .../structures/DungeonRoomLoader.java | 102 +++++++++ .../structures/DungeonRoomRegistry.java | 33 +++ .../structures/DungeonStructure.java | 56 +++++ .../bloodmagic/structures/DungeonTester.java | 106 ++++++++++ .../bloodmagic/structures/DungeonUtil.java | 55 +++++ .../structures/ItemDungeonTester.java | 29 +++ .../bloodmagic/structures/ModDungeons.java | 28 +++ .../schematics/four_way_corridor.json | 56 +++++ .../schematics/four_way_corridor_loot.json | 56 +++++ .../bloodmagic/schematics/ore_hold_1.json | 69 ++++++ .../bloodmagic/schematics/schematics.json | 3 + .../schematics/straight_corridor.json | 42 ++++ .../bloodmagic/schematics/t_corridor.json | 49 +++++ .../textures/block/dungeon/dungeon_ore.png | Bin 0 -> 7090 bytes .../textures/item/dungeon_tester.png | Bin 0 -> 902 bytes .../structures/four_way_corridor.nbt | Bin 0 -> 2055 bytes .../structures/four_way_corridor_loot.nbt | Bin 0 -> 3870 bytes .../data/bloodmagic/structures/ore_hold_1.nbt | Bin 0 -> 9256 bytes .../structures/straight_corridor.nbt | Bin 0 -> 1210 bytes .../data/bloodmagic/structures/t_corridor.nbt | Bin 0 -> 1556 bytes 35 files changed, 1173 insertions(+), 1 deletion(-) create mode 100644 src/generated/resources/assets/bloodmagic/blockstates/dungeon_ore.json create mode 100644 src/generated/resources/assets/bloodmagic/models/block/dungeon_ore.json create mode 100644 src/generated/resources/assets/bloodmagic/models/item/dungeon_ore.json create mode 100644 src/generated/resources/assets/bloodmagic/models/item/dungeon_tester.json create mode 100644 src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_ore.json create mode 100644 src/main/java/wayoftime/bloodmagic/gson/SerializerBase.java create mode 100644 src/main/java/wayoftime/bloodmagic/gson/Serializers.java create mode 100644 src/main/java/wayoftime/bloodmagic/structures/Dungeon.java create mode 100644 src/main/java/wayoftime/bloodmagic/structures/DungeonRoom.java create mode 100644 src/main/java/wayoftime/bloodmagic/structures/DungeonRoomLoader.java create mode 100644 src/main/java/wayoftime/bloodmagic/structures/DungeonRoomRegistry.java create mode 100644 src/main/java/wayoftime/bloodmagic/structures/DungeonStructure.java create mode 100644 src/main/java/wayoftime/bloodmagic/structures/DungeonTester.java create mode 100644 src/main/java/wayoftime/bloodmagic/structures/DungeonUtil.java create mode 100644 src/main/java/wayoftime/bloodmagic/structures/ItemDungeonTester.java create mode 100644 src/main/java/wayoftime/bloodmagic/structures/ModDungeons.java create mode 100644 src/main/resources/assets/bloodmagic/schematics/four_way_corridor.json create mode 100644 src/main/resources/assets/bloodmagic/schematics/four_way_corridor_loot.json create mode 100644 src/main/resources/assets/bloodmagic/schematics/ore_hold_1.json create mode 100644 src/main/resources/assets/bloodmagic/schematics/schematics.json create mode 100644 src/main/resources/assets/bloodmagic/schematics/straight_corridor.json create mode 100644 src/main/resources/assets/bloodmagic/schematics/t_corridor.json create mode 100644 src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_ore.png create mode 100644 src/main/resources/assets/bloodmagic/textures/item/dungeon_tester.png create mode 100644 src/main/resources/data/bloodmagic/structures/four_way_corridor.nbt create mode 100644 src/main/resources/data/bloodmagic/structures/four_way_corridor_loot.nbt create mode 100644 src/main/resources/data/bloodmagic/structures/ore_hold_1.nbt create mode 100644 src/main/resources/data/bloodmagic/structures/straight_corridor.nbt create mode 100644 src/main/resources/data/bloodmagic/structures/t_corridor.nbt diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 5226c4f5..0390817a 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -18,6 +18,7 @@ c67498a81f8dd53770da51df45192b171cdd234c assets/bloodmagic/blockstates/dungeon_b 8b568926830785a5cb848fb36d4ae01e67590501 assets/bloodmagic/blockstates/dungeon_brick_stairs.json 6c10c79909e008b960f2d78543f55847eec7a226 assets/bloodmagic/blockstates/dungeon_brick_wall.json 8a04e502b6965d912793699d61071e44428fceb8 assets/bloodmagic/blockstates/dungeon_eye.json +fe31978b41dc50c21f413c81410221f657fd4d23 assets/bloodmagic/blockstates/dungeon_ore.json 388af5c6d34f62d66d987760871c64793df84a37 assets/bloodmagic/blockstates/dungeon_pillar_cap.json 8d8d58ad890f339b75dbdfc710b30dc00eed2ef3 assets/bloodmagic/blockstates/dungeon_pillar_center.json 48e7b0533fa722eb66956e01de661ebac6470da7 assets/bloodmagic/blockstates/dungeon_pillar_special.json @@ -52,7 +53,7 @@ e6d9cf699667aaa47efff37b2b033895dee29c15 assets/bloodmagic/blockstates/waterritu 42f26f715bddd16c069f9b51e3767b36477c8908 assets/bloodmagic/blockstates/woodtilepath.json 3c6ce233dae6c1307d9016406c324bbe844b4e1e assets/bloodmagic/blockstates/wornstonebrickpath.json d59655f12d1724b73b77c373fb6864fcff69db12 assets/bloodmagic/blockstates/wornstonetilepath.json -d3b0f3df0b83423d59343a185b28f6de543b64bb assets/bloodmagic/lang/en_us.json +e7aab24fc4aa77601119478854ad929a1f384132 assets/bloodmagic/lang/en_us.json 34445195b9f2459475cde53454bc8e37d32865d7 assets/bloodmagic/models/block/accelerationrune.json bcdbccc49d4509571be6988762ab87126275a4c8 assets/bloodmagic/models/block/airritualstone.json adf6c0b1e25451609486dc8c8cfbd9cf0f8c67f4 assets/bloodmagic/models/block/alchemicalreactionchamber.json @@ -113,6 +114,7 @@ ffb2021036b74d29fca5fc706885f3e1399c2950 assets/bloodmagic/models/block/dungeon_ a7d371e5d0efefae2729131bda16120bfe477bb8 assets/bloodmagic/models/block/dungeon_brick_wall_side.json bd152efd619489661cac86a80190bf9e88c86363 assets/bloodmagic/models/block/dungeon_brick_wall_side_tall.json 19ae530a34eb5cee35dc7b9cdd51c9c2d61fdc9e assets/bloodmagic/models/block/dungeon_eye.json +61eb4e5ede53a8278d2d95fbeb40dc01424f2895 assets/bloodmagic/models/block/dungeon_ore.json a4449c1d14c46bcda58b542c3efdddadff15bedc assets/bloodmagic/models/block/dungeon_pillar_cap.json 1752cc99d0c334016bebd0e8027b8abe3ca5d7e8 assets/bloodmagic/models/block/dungeon_pillar_cap_down.json f171162bb4b86e70f2b2f13f3393704d295a4d86 assets/bloodmagic/models/block/dungeon_pillar_cap_east.json @@ -205,6 +207,7 @@ f866879eed9f1bd7eebac14495de599ca3ad855d assets/bloodmagic/models/item/dungeon_b 2ec6a2c66e88981ff54e74035bb3adb1ec4f6396 assets/bloodmagic/models/item/dungeon_brick_stairs.json 098a26f4e9222c801f9a17a6db1b266ad4085003 assets/bloodmagic/models/item/dungeon_brick_wall.json 0a48c4fd74036702ae2d72a9b2333c2bdf5ab31b assets/bloodmagic/models/item/dungeon_eye.json +95a45fae0890e626aa5e5ff85b9884bd30087244 assets/bloodmagic/models/item/dungeon_ore.json ba5c610437b7d3a84820109c32d204310ff41fd7 assets/bloodmagic/models/item/dungeon_pillar_cap.json d098a544e7b9918a45106c2cbc5e10baea66502a assets/bloodmagic/models/item/dungeon_pillar_center.json 5284f1cc7508546c66669564182fe5056053333d assets/bloodmagic/models/item/dungeon_pillar_special.json @@ -214,6 +217,7 @@ d098a544e7b9918a45106c2cbc5e10baea66502a assets/bloodmagic/models/item/dungeon_p f3b763d6edc3c75655797481f05e02d409f481d9 assets/bloodmagic/models/item/dungeon_polished_wall.json 2ecba4811bd02698f6a34b5cdd9160426f7bda63 assets/bloodmagic/models/item/dungeon_smallbrick.json 2d7a8a3ed9f91a5bf5c277c6342c69e97692d347 assets/bloodmagic/models/item/dungeon_stone.json +027369d4162f28a808223ca7b22bdb68de28f290 assets/bloodmagic/models/item/dungeon_tester.json 6186d2045f87b1e6cc7006226993a93b63d650ff assets/bloodmagic/models/item/dungeon_tile.json 21e8a4fa93ba249684e0624a10a6f0f00ff6d194 assets/bloodmagic/models/item/dungeon_tilespecial.json 10aceefca3ad3f0da773cb317c4effc6c06051ea assets/bloodmagic/models/item/duskritualstone.json @@ -413,6 +417,7 @@ be050ff812ae62793e3c51d7c2ab343294ede7f0 data/bloodmagic/loot_tables/blocks/dung 0d30aeb91425e2419abf555e9baab34475f45afc data/bloodmagic/loot_tables/blocks/dungeon_brick_stairs.json fa335aded871280065ca02db79d6de59ced7f6c9 data/bloodmagic/loot_tables/blocks/dungeon_brick_wall.json 47baa958866616d96eb39e2671a4cf488e0abae2 data/bloodmagic/loot_tables/blocks/dungeon_eye.json +234675dab5d5ff7e1fec0e13cede1f141811fc92 data/bloodmagic/loot_tables/blocks/dungeon_ore.json 53864c213b973e67006cda4596877bcdd3474396 data/bloodmagic/loot_tables/blocks/dungeon_pillar_cap.json db8be3b67639ab451d0a28e0674240094ceea046 data/bloodmagic/loot_tables/blocks/dungeon_pillar_center.json c3deab4dd4ef8c1cf6f217d660ea07e5d7bd8555 data/bloodmagic/loot_tables/blocks/dungeon_pillar_special.json diff --git a/src/generated/resources/assets/bloodmagic/blockstates/dungeon_ore.json b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_ore.json new file mode 100644 index 00000000..a44ddeae --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/blockstates/dungeon_ore.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "bloodmagic:block/dungeon_ore" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/lang/en_us.json b/src/generated/resources/assets/bloodmagic/lang/en_us.json index e6065ae3..4599f71d 100644 --- a/src/generated/resources/assets/bloodmagic/lang/en_us.json +++ b/src/generated/resources/assets/bloodmagic/lang/en_us.json @@ -22,6 +22,7 @@ "block.bloodmagic.dungeon_brick_stairs": "Demon Brick Stairs", "block.bloodmagic.dungeon_brick_wall": "Demon Brick Wall", "block.bloodmagic.dungeon_eye": "Demon Eye", + "block.bloodmagic.dungeon_ore": "Demonite", "block.bloodmagic.dungeon_pillar_cap": "Demon Stone Pillar Cap", "block.bloodmagic.dungeon_pillar_center": "Demon Stone Pillar", "block.bloodmagic.dungeon_pillar_special": "Accented Demon Stone Pillar", diff --git a/src/generated/resources/assets/bloodmagic/models/block/dungeon_ore.json b/src/generated/resources/assets/bloodmagic/models/block/dungeon_ore.json new file mode 100644 index 00000000..93254ada --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/block/dungeon_ore.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "bloodmagic:block/dungeon/dungeon_ore" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_ore.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_ore.json new file mode 100644 index 00000000..64362081 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_ore.json @@ -0,0 +1,3 @@ +{ + "parent": "bloodmagic:block/dungeon_ore" +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/dungeon_tester.json b/src/generated/resources/assets/bloodmagic/models/item/dungeon_tester.json new file mode 100644 index 00000000..c5cafd38 --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/dungeon_tester.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "bloodmagic:item/dungeon_tester" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_ore.json b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_ore.json new file mode 100644 index 00000000..666396e2 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/loot_tables/blocks/dungeon_ore.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "bloodmagic:dungeon_ore" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/BloodMagic.java b/src/main/java/wayoftime/bloodmagic/BloodMagic.java index 716bb7ad..dc0d09f5 100644 --- a/src/main/java/wayoftime/bloodmagic/BloodMagic.java +++ b/src/main/java/wayoftime/bloodmagic/BloodMagic.java @@ -53,6 +53,7 @@ import wayoftime.bloodmagic.network.BloodMagicPacketHandler; import wayoftime.bloodmagic.potion.BloodMagicPotions; import wayoftime.bloodmagic.registry.ModTranquilityHandlers; import wayoftime.bloodmagic.ritual.RitualManager; +import wayoftime.bloodmagic.structures.ModDungeons; import wayoftime.bloodmagic.tile.TileAlchemicalReactionChamber; import wayoftime.bloodmagic.tile.TileAlchemyArray; import wayoftime.bloodmagic.tile.TileAlchemyTable; @@ -127,6 +128,7 @@ public class BloodMagic context.registerConfig(ModConfig.Type.CLIENT, ConfigManager.CLIENT_SPEC); ModTranquilityHandlers.init(); + ModDungeons.init(); } private void registerRecipes(RegistryEvent.Register> event) diff --git a/src/main/java/wayoftime/bloodmagic/common/block/BloodMagicBlocks.java b/src/main/java/wayoftime/bloodmagic/common/block/BloodMagicBlocks.java index 62e75d65..46b19644 100644 --- a/src/main/java/wayoftime/bloodmagic/common/block/BloodMagicBlocks.java +++ b/src/main/java/wayoftime/bloodmagic/common/block/BloodMagicBlocks.java @@ -117,6 +117,7 @@ public class BloodMagicBlocks public static final RegistryObject DUNGEON_BRICK_1 = DUNGEONBLOCKS.register("dungeon_brick1", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); public static final RegistryObject DUNGEON_BRICK_2 = DUNGEONBLOCKS.register("dungeon_brick2", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); public static final RegistryObject DUNGEON_BRICK_3 = DUNGEONBLOCKS.register("dungeon_brick3", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); + public static final RegistryObject DUNGEON_ORE = DUNGEONBLOCKS.register("dungeon_ore", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(3.0F, 3.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); public static final RegistryObject DUNGEON_STONE = BLOCKS.register("dungeon_stone", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool())); public static final RegistryObject DUNGEON_EYE = DUNGEONBLOCKS.register("dungeon_eye", () -> new Block(Properties.create(Material.ROCK).hardnessAndResistance(2.0F, 5.0F).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE).harvestLevel(2).setRequiresTool().setLightLevel((state) -> { diff --git a/src/main/java/wayoftime/bloodmagic/common/data/GeneratorLanguage.java b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorLanguage.java index 991329f5..63a59469 100644 --- a/src/main/java/wayoftime/bloodmagic/common/data/GeneratorLanguage.java +++ b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorLanguage.java @@ -366,6 +366,8 @@ public class GeneratorLanguage extends LanguageProvider addBlock(BloodMagicBlocks.DUNGEON_PILLAR_SPECIAL, "Accented Demon Stone Pillar"); addBlock(BloodMagicBlocks.DUNGEON_EYE, "Demon Eye"); + addBlock(BloodMagicBlocks.DUNGEON_ORE, "Demonite"); + // Item names addItem(BloodMagicItems.WEAK_BLOOD_ORB, "Weak Blood Orb"); addItem(BloodMagicItems.APPRENTICE_BLOOD_ORB, "Apprentice Blood Orb"); diff --git a/src/main/java/wayoftime/bloodmagic/common/item/BloodMagicItems.java b/src/main/java/wayoftime/bloodmagic/common/item/BloodMagicItems.java index bedc581c..a9b53118 100644 --- a/src/main/java/wayoftime/bloodmagic/common/item/BloodMagicItems.java +++ b/src/main/java/wayoftime/bloodmagic/common/item/BloodMagicItems.java @@ -31,6 +31,7 @@ import wayoftime.bloodmagic.common.registration.impl.BloodOrbDeferredRegister; import wayoftime.bloodmagic.common.registration.impl.BloodOrbRegistryObject; import wayoftime.bloodmagic.orb.BloodOrb; import wayoftime.bloodmagic.ritual.EnumRuneType; +import wayoftime.bloodmagic.structures.ItemDungeonTester; import wayoftime.bloodmagic.will.EnumDemonWillType; public class BloodMagicItems @@ -231,4 +232,9 @@ public class BloodMagicItems public static final RegistryObject DUNGEON_POLISHED_WALL_BLOCK = ITEMS.register("dungeon_polished_wall", () -> new BlockItem(BloodMagicBlocks.DUNGEON_POLISHED_WALL.get(), new Item.Properties().group(BloodMagic.TAB))); public static final RegistryObject DUNGEON_BRICK_GATE_BLOCK = ITEMS.register("dungeon_brick_gate", () -> new BlockItem(BloodMagicBlocks.DUNGEON_BRICK_GATE.get(), new Item.Properties().group(BloodMagic.TAB))); public static final RegistryObject DUNGEON_POLISHED_GATE_BLOCK = ITEMS.register("dungeon_polished_gate", () -> new BlockItem(BloodMagicBlocks.DUNGEON_POLISHED_GATE.get(), new Item.Properties().group(BloodMagic.TAB))); + + public static final RegistryObject DUNGEON_ORE_BLOCK = ITEMS.register("dungeon_ore", () -> new BlockItem(BloodMagicBlocks.DUNGEON_ORE.get(), new Item.Properties().group(BloodMagic.TAB))); + + public static final RegistryObject DUNGEON_TESTER = BASICITEMS.register("dungeon_tester", ItemDungeonTester::new); + } diff --git a/src/main/java/wayoftime/bloodmagic/gson/SerializerBase.java b/src/main/java/wayoftime/bloodmagic/gson/SerializerBase.java new file mode 100644 index 00000000..80bd8135 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/gson/SerializerBase.java @@ -0,0 +1,28 @@ +package wayoftime.bloodmagic.gson; + +import java.lang.reflect.Type; + +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonParseException; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; + +public abstract class SerializerBase implements JsonDeserializer, JsonSerializer +{ + @Override + public T deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) + throws JsonParseException + { + return context.deserialize(json, getType()); + } + + @Override + public JsonElement serialize(T src, Type typeOfSrc, JsonSerializationContext context) + { + return context.serialize(src); + } + + public abstract Class getType(); +} diff --git a/src/main/java/wayoftime/bloodmagic/gson/Serializers.java b/src/main/java/wayoftime/bloodmagic/gson/Serializers.java new file mode 100644 index 00000000..41f6d28d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/gson/Serializers.java @@ -0,0 +1,128 @@ +package wayoftime.bloodmagic.gson; + +import java.lang.reflect.Type; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.JsonSerializationContext; + +import net.minecraft.item.ItemStack; +import net.minecraft.network.PacketBuffer; +import net.minecraft.network.datasync.DataParameter; +import net.minecraft.network.datasync.DataSerializers; +import net.minecraft.network.datasync.IDataSerializer; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.registries.ForgeRegistries; +import wayoftime.bloodmagic.will.EnumDemonWillType; + +public class Serializers +{ + // Data serializers + public static final IDataSerializer WILL_TYPE_SERIALIZER = new IDataSerializer() + { + @Override + public void write(PacketBuffer buf, EnumDemonWillType value) + { + buf.writeEnumValue(value); + } + + @Override + public EnumDemonWillType read(PacketBuffer buf) + { + return buf.readEnumValue(EnumDemonWillType.class); + } + + @Override + public DataParameter createKey(int id) + { + return new DataParameter<>(id, this); + } + + @Override + public EnumDemonWillType copyValue(EnumDemonWillType value) + { + return EnumDemonWillType.valueOf(value.name()); + } + }; + + // Serializers + public static final SerializerBase FACING_SERIALIZER = new SerializerBase() + { + @Override + public Class getType() + { + return Direction.class; + } + + @Override + public Direction deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) + throws JsonParseException + { + return Direction.byName(json.getAsString()); + } + }; + public static final SerializerBase RESOURCELOCATION_SERIALIZER = new SerializerBase() + { + @Override + public Class getType() + { + return ResourceLocation.class; + } + + @Override + public ResourceLocation deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) + throws JsonParseException + { + String domain = json.getAsJsonObject().get("domain").getAsString(); + String path = json.getAsJsonObject().get("path").getAsString(); + return new ResourceLocation(domain, path); + } + + @Override + public JsonElement serialize(ResourceLocation src, Type typeOfSrc, JsonSerializationContext context) + { + JsonObject object = new JsonObject(); + object.addProperty("domain", src.getNamespace()); + object.addProperty("path", src.getPath()); + return object; + } + }; + public static final SerializerBase ITEMMETA_SERIALIZER = new SerializerBase() + { + @Override + public Class getType() + { + return ItemStack.class; + } + + @Override + public ItemStack deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) + throws JsonParseException + { + ResourceLocation registryName = context.deserialize(json.getAsJsonObject().get("registryName").getAsJsonObject(), ResourceLocation.class); + int meta = json.getAsJsonObject().get("meta").getAsInt(); + return new ItemStack(ForgeRegistries.ITEMS.getValue(registryName), 1); + } + + @Override + public JsonElement serialize(ItemStack src, Type typeOfSrc, JsonSerializationContext context) + { + JsonObject jsonObject = new JsonObject(); + jsonObject.add("registryName", context.serialize(src.getItem().getRegistryName())); + jsonObject.addProperty("meta", src.getDamage()); + return jsonObject; + } + }; + + public static final Gson GSON = new GsonBuilder().serializeNulls().setPrettyPrinting().disableHtmlEscaping().registerTypeAdapter(FACING_SERIALIZER.getType(), FACING_SERIALIZER).registerTypeAdapter(RESOURCELOCATION_SERIALIZER.getType(), RESOURCELOCATION_SERIALIZER).registerTypeAdapter(ITEMMETA_SERIALIZER.getType(), ITEMMETA_SERIALIZER).create(); + + static + { + DataSerializers.registerSerializer(WILL_TYPE_SERIALIZER); + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/structures/Dungeon.java b/src/main/java/wayoftime/bloodmagic/structures/Dungeon.java new file mode 100644 index 00000000..add4a1ff --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/Dungeon.java @@ -0,0 +1,196 @@ +package wayoftime.bloodmagic.structures; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Random; + +import org.apache.commons.lang3.tuple.Pair; + +import net.minecraft.util.Direction; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.gen.feature.template.PlacementSettings; +import net.minecraft.world.server.ServerWorld; +import wayoftime.bloodmagic.ritual.AreaDescriptor; +import wayoftime.bloodmagic.util.BMLog; + +public class Dungeon +{ + public static boolean placeStructureAtPosition(Random rand, ServerWorld world, BlockPos pos) + { + long startTime = System.nanoTime(); + + 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 + // of actual positions + + PlacementSettings settings = new PlacementSettings(); + Mirror mir = Mirror.NONE; + + settings.setMirror(mir); + + Rotation rot = Rotation.NONE; + + settings.setRotation(rot); + settings.setIgnoreEntities(true); + settings.setChunk(null); + +// settings.setReplacedBlock(null); + +// settings.setIgnoreStructureBlock(false); + settings.func_215223_c(true); + +// PlacementSettings placementsettings = (new PlacementSettings()).setMirror(this.mirror).setRotation(this.rotation).setIgnoreEntities(this.ignoreEntities).setChunk((ChunkPos)null); +// if (this.integrity < 1.0F) { +// placementsettings.clearProcessors().addProcessor(new IntegrityProcessor(MathHelper.clamp(this.integrity, 0.0F, 1.0F))).setRandom(func_214074_b(this.seed)); +// } +// +// BlockPos blockpos2 = blockpos.add(this.position); +// p_242689_3_.func_237144_a_(p_242689_1_, blockpos2, placementsettings, func_214074_b(this.seed)); + + DungeonRoom room = getRandomRoom(rand); + roomMap.put(pos, Pair.of(room, settings.copy())); + descriptorList.addAll(room.getAreaDescriptors(settings, pos)); + for (Direction facing : Direction.values()) + { + if (availableDoorMap.containsKey(facing)) + { + List doorList = availableDoorMap.get(facing); + doorList.addAll(room.getDoorOffsetsForFacing(settings, facing, pos)); + } else + { + List doorList = room.getDoorOffsetsForFacing(settings, facing, pos); + availableDoorMap.put(facing, doorList); + } + } + + // Initial AreaDescriptors and door positions are initialized. Time for fun! + for (int i = 0; i < 100; i++) + { + List facingList = new ArrayList<>(); + for (Entry> entry : availableDoorMap.entrySet()) + { + if (entry.getValue() != null && !entry.getValue().isEmpty()) + { + facingList.add(entry.getKey()); + } + } + + Collections.shuffle(facingList); // Shuffle the list so that it is random what is chosen + + Pair removedDoor1 = null; + Pair removedDoor2 = null; + BlockPos roomLocation = null; + + for (Direction doorFacing : facingList) + { + Direction oppositeDoorFacing = doorFacing.getOpposite(); + List availableDoorList = availableDoorMap.get(doorFacing); // May need to copy here + Collections.shuffle(availableDoorList); + + settings.setRotation(Rotation.values()[rand.nextInt(Rotation.values().length)]); // Same for the Mirror + DungeonRoom testingRoom = getRandomRoom(rand); + + List otherDoorList = testingRoom.getDoorOffsetsForFacing(settings, oppositeDoorFacing, BlockPos.ZERO); + if (otherDoorList != null && !otherDoorList.isEmpty()) + { + // See if one of these doors works. + Collections.shuffle(otherDoorList); + BlockPos testDoor = otherDoorList.get(0); + testDoor: for (BlockPos availableDoor : availableDoorList) + { + // TODO: Test if it fits, then add the doors to the list. + roomLocation = availableDoor.subtract(testDoor).add(doorFacing.getDirectionVec()); + + List descriptors = testingRoom.getAreaDescriptors(settings, roomLocation); + for (AreaDescriptor testDesc : descriptors) + { + for (AreaDescriptor currentDesc : descriptorList) + { + if (testDesc.intersects(currentDesc)) + { + break testDoor; + } + } + } + + roomMap.put(roomLocation, Pair.of(testingRoom, settings.copy())); + descriptorList.addAll(descriptors); + removedDoor1 = Pair.of(doorFacing, availableDoor); + removedDoor2 = Pair.of(oppositeDoorFacing, testDoor.add(roomLocation)); + + room = testingRoom; + + } + + break; + } + +// Collections.shuffle(otherDoorList); + } + + if (removedDoor1 != null) + { + for (Direction facing : Direction.values()) + { + if (availableDoorMap.containsKey(facing)) + { + List doorList = availableDoorMap.get(facing); + doorList.addAll(room.getDoorOffsetsForFacing(settings, facing, roomLocation)); + } else + { + List doorList = room.getDoorOffsetsForFacing(settings, facing, roomLocation); + availableDoorMap.put(facing, doorList); + } + } + + Direction face = removedDoor1.getKey(); + if (availableDoorMap.containsKey(face)) + { + availableDoorMap.get(face).remove(removedDoor1.getRight()); + } + } + + if (removedDoor2 != null) + { + Direction face = removedDoor2.getKey(); + if (availableDoorMap.containsKey(face)) + { + availableDoorMap.get(face).remove(removedDoor2.getRight()); + } + } + } + + long endTime = System.nanoTime(); + + long duration = (endTime - startTime); // divide by 1000000 to get milliseconds. + BMLog.DEBUG.info("Duration: " + duration + "(ns), " + duration / 1000000 + "(ms)"); + + // Building what I've got + for (Entry> entry : roomMap.entrySet()) + { + BlockPos placementPos = entry.getKey(); + DungeonRoom placedRoom = entry.getValue().getKey(); + PlacementSettings placementSettings = entry.getValue().getValue(); + + placedRoom.placeStructureAtPosition(rand, placementSettings, world, placementPos); + } + + System.out.println(roomMap.size()); + + return false; + } + + public static DungeonRoom getRandomRoom(Random rand) + { +// System.out.println("Dungeon size: " + DungeonRoomRegistry.dungeonWeightMap.size()); + return DungeonRoomRegistry.getRandomDungeonRoom(rand); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/structures/DungeonRoom.java b/src/main/java/wayoftime/bloodmagic/structures/DungeonRoom.java new file mode 100644 index 00000000..9e2dc086 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/DungeonRoom.java @@ -0,0 +1,78 @@ +package wayoftime.bloodmagic.structures; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Random; + +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.gen.feature.template.PlacementSettings; +import net.minecraft.world.gen.feature.template.Template; +import net.minecraft.world.server.ServerWorld; +import wayoftime.bloodmagic.ritual.AreaDescriptor; + +public class DungeonRoom +{ + public int dungeonWeight = 1; + public Map structureMap = new HashMap<>(); + + public Map> doorMap = new HashMap<>(); // Map of doors. The EnumFacing indicates what way + // this door faces. + public List descriptorList = new ArrayList<>(); + + public DungeonRoom(Map structureMap, Map> doorMap, List descriptorList) + { + this.structureMap = structureMap; + this.doorMap = doorMap; + this.descriptorList = descriptorList; + } + + public List getAreaDescriptors(PlacementSettings settings, BlockPos offset) + { + List newList = new ArrayList<>(); + + for (AreaDescriptor desc : descriptorList) + { + newList.add(desc.rotateDescriptor(settings).offset(offset)); + } + + return newList; + } + + public List getDoorOffsetsForFacing(PlacementSettings settings, Direction facing, BlockPos offset) + { + List offsetList = new ArrayList<>(); + +// Direction originalFacing = DungeonUtil.rotate(settings.getMirror(), settings.getRotation(), facing); + Direction originalFacing = DungeonUtil.reverseRotate(settings.getMirror(), settings.getRotation(), facing); +// Direction originalFacing = facing; + if (doorMap.containsKey(originalFacing)) + { + List doorList = doorMap.get(originalFacing); + for (BlockPos doorPos : doorList) + { + offsetList.add(Template.transformedBlockPos(settings, doorPos).add(offset)); + } + } + + return offsetList; + } + + public boolean placeStructureAtPosition(Random rand, PlacementSettings settings, ServerWorld world, BlockPos pos) + { + for (Entry entry : structureMap.entrySet()) + { + ResourceLocation location = new ResourceLocation(entry.getKey()); + DungeonStructure structure = new DungeonStructure(location); + BlockPos offsetPos = Template.transformedBlockPos(settings, entry.getValue()); + + structure.placeStructureAtPosition(rand, settings, world, pos.add(offsetPos)); + } + + return true; + } +} diff --git a/src/main/java/wayoftime/bloodmagic/structures/DungeonRoomLoader.java b/src/main/java/wayoftime/bloodmagic/structures/DungeonRoomLoader.java new file mode 100644 index 00000000..9eabeb69 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/DungeonRoomLoader.java @@ -0,0 +1,102 @@ +package wayoftime.bloodmagic.structures; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.Writer; +import java.net.URL; +import java.util.List; +import java.util.Random; + +import org.apache.commons.io.IOUtils; + +import com.google.common.base.Charsets; +import com.google.common.io.Resources; +import com.google.common.reflect.TypeToken; + +import net.minecraft.util.ResourceLocation; +import wayoftime.bloodmagic.BloodMagic; +import wayoftime.bloodmagic.gson.Serializers; + +public class DungeonRoomLoader +{ + public static void saveDungeons() + { + for (DungeonRoom room : DungeonRoomRegistry.dungeonWeightMap.keySet()) + { + saveSingleDungeon(room); + } + } + + public static void saveSingleDungeon(DungeonRoom room) + { + String json = Serializers.GSON.toJson(room); + + Writer writer; + try + { + File file = new File("config/BloodMagic/schematics"); + file.mkdirs(); + + writer = new FileWriter("config/BloodMagic/schematics/" + new Random().nextInt() + ".json"); + writer.write(json); + writer.close(); + } catch (IOException e) + { + e.printStackTrace(); + } + } + + public static void loadDungeons() + { + try + { +// System.out.println("LOADING DEMON DUNGEONS"); + + URL schematicURL = DungeonRoomLoader.class.getResource(resLocToResourcePath(new ResourceLocation("bloodmagic:schematics"))); + List schematics = Serializers.GSON.fromJson(Resources.toString(schematicURL, Charsets.UTF_8), new TypeToken>() + { + }.getType()); + for (String schematicKey : schematics) + { + ResourceLocation schematic = new ResourceLocation(schematicKey); + URL dungeonURL = DungeonRoomLoader.class.getResource(resLocToResourcePath(schematic)); + DungeonRoom dungeonRoom = Serializers.GSON.fromJson(Resources.toString(dungeonURL, Charsets.UTF_8), DungeonRoom.class); + DungeonRoomRegistry.registerDungeonRoom(dungeonRoom, Math.max(1, dungeonRoom.dungeonWeight)); + } + + System.out.println("# schematics: " + schematics.size()); + + } catch (Exception e) + { + e.printStackTrace(); + } + } + + public static void test() + { + ResourceLocation id = new ResourceLocation(BloodMagic.MODID, "testGson"); + String s = id.getNamespace(); + String s1 = id.getPath(); + InputStream inputstream = null; + + try + { + inputstream = DungeonRoomLoader.class.getResourceAsStream("/assets/" + s + "/schematics/" + s1 + ".nbt"); +// this.readTemplateFromStream(s1, inputstream); + return; + } catch (Throwable var10) + { + + } finally + { + IOUtils.closeQuietly(inputstream); + } + } + + public static String resLocToResourcePath(ResourceLocation resourceLocation) + { + return "/assets/" + resourceLocation.getNamespace() + "/schematics/" + resourceLocation.getPath() + ".json"; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/structures/DungeonRoomRegistry.java b/src/main/java/wayoftime/bloodmagic/structures/DungeonRoomRegistry.java new file mode 100644 index 00000000..4a8f46f2 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/DungeonRoomRegistry.java @@ -0,0 +1,33 @@ +package wayoftime.bloodmagic.structures; + +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Random; + +public class DungeonRoomRegistry +{ + public static Map dungeonWeightMap = new HashMap<>(); + private static int totalWeight = 0; + + public static void registerDungeonRoom(DungeonRoom room, int weight) + { + dungeonWeightMap.put(room, weight); + totalWeight += weight; + } + + public static DungeonRoom getRandomDungeonRoom(Random rand) + { + int wantedWeight = rand.nextInt(totalWeight); + for (Entry entry : dungeonWeightMap.entrySet()) + { + wantedWeight -= entry.getValue(); + if (wantedWeight < 0) + { + return entry.getKey(); + } + } + + return null; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/structures/DungeonStructure.java b/src/main/java/wayoftime/bloodmagic/structures/DungeonStructure.java new file mode 100644 index 00000000..d041243c --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/DungeonStructure.java @@ -0,0 +1,56 @@ +package wayoftime.bloodmagic.structures; + +import java.util.Random; + +import net.minecraft.server.MinecraftServer; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.gen.feature.template.PlacementSettings; +import net.minecraft.world.gen.feature.template.Template; +import net.minecraft.world.gen.feature.template.TemplateManager; +import net.minecraft.world.server.ServerWorld; +import wayoftime.bloodmagic.util.BMLog; + +public class DungeonStructure +{ + public ResourceLocation resource; + + public DungeonStructure(ResourceLocation resource) + { + this.resource = resource; + } + + public boolean placeStructureAtPosition(Random rand, PlacementSettings settings, ServerWorld world, BlockPos pos) + { + + if (pos == null) + return false; + + MinecraftServer minecraftserver = world.getServer(); + TemplateManager templatemanager = world.getStructureTemplateManager(); + + Template template = templatemanager.getTemplate(resource); + + if (template == null) + { + System.out.println("Invalid template for location: " + resource); + BMLog.DEBUG.warn("Invalid template for location: " + resource); + return false; + } + +// settings.func_189946_a(MathHelper.clamp_float(schema.integrity, 0.0F, 1.0F)); + + BlockPos offset = Template.transformedBlockPos(settings, new BlockPos(0, 0, 0)); + BlockPos finalPos = pos.add(offset); +// template.addBlocksToWorldChunk(world, finalPos, settings); + template.func_237144_a_(world, finalPos, settings, rand); +// template.func_237152_b_(world, finalPos, settings, rand); + + return true; + } + + public DungeonStructure copy() + { + return new DungeonStructure(resource); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/structures/DungeonTester.java b/src/main/java/wayoftime/bloodmagic/structures/DungeonTester.java new file mode 100644 index 00000000..1a452c3a --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/DungeonTester.java @@ -0,0 +1,106 @@ +package wayoftime.bloodmagic.structures; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; + +import net.minecraft.block.Blocks; +import net.minecraft.util.Direction; +import net.minecraft.util.Mirror; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.Rotation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.ChunkPos; +import net.minecraft.world.gen.feature.template.PlacementSettings; +import net.minecraft.world.server.ServerWorld; +import wayoftime.bloodmagic.BloodMagic; + +public class DungeonTester +{ + public static void testDungeonGeneration(ServerWorld world, BlockPos pos) + { + + } + + public static void testDungeonElementWithOutput(ServerWorld world, BlockPos pos) + { +// Dungeon.placeStructureAtPosition(new Random(), world, pos); + ResourceLocation resource = new ResourceLocation(BloodMagic.MODID, "t_corridor"); + +// DungeonStructure structure = new DungeonStructure(resource); +// Map structureMap = new HashMap(); +// structureMap.put(structure, new BlockPos(0, 0, 0)); + + Map structureMap = new HashMap(); + structureMap.put(resource.toString(), BlockPos.ZERO); + +// Map> doorMap = new HashMap>(); +// List descriptorList = new ArrayList(); +// descriptorList.add(new AreaDescriptor.Rectangle(new BlockPos(0, 0, 0), 11, 5, 8)); +// +// DungeonUtil.addRoom(doorMap, Direction.NORTH, new BlockPos(5, 0, 0)); +// DungeonUtil.addRoom(doorMap, Direction.EAST, new BlockPos(10, 0, 5)); +// DungeonUtil.addRoom(doorMap, Direction.WEST, new BlockPos(0, 0, 5)); +// +// DungeonRoom room = new DungeonRoom(structureMap, doorMap, descriptorList); + + DungeonRoom room = Dungeon.getRandomRoom(new Random()); + + PlacementSettings settings = new PlacementSettings(); + + Mirror mir = Mirror.NONE; + settings.setMirror(mir); + + net.minecraft.util.Rotation rot = Rotation.NONE; + settings.setRotation(rot); + + settings.setIgnoreEntities(true); + settings.setChunk((ChunkPos) null); + settings.func_215223_c(true); +// settings.setReplacedBlock((Block) null); +// settings.setIgnoreStructureBlock(false); + + int i = 0; + + for (Mirror mirror : Mirror.values()) + { + System.out.print("Mirror: " + mirror + '\n'); + int j = 0; + for (Rotation rotation : Rotation.values()) + { + System.out.print("Rotation: " + rotation + '\n'); + settings.setRotation(rotation); + settings.setMirror(mirror); + + BlockPos offsetPos = pos.add(i * 32, 0, j * 32); + room.placeStructureAtPosition(new Random(), settings, world, offsetPos); + + world.setBlockState(offsetPos, Blocks.REDSTONE_BLOCK.getDefaultState(), 3); + +// List descriptors = room.getAreaDescriptors(settings, offsetPos); +// for (AreaDescriptor desc : descriptors) +// { +// List posList = desc.getContainedPositions(new BlockPos(0, 0, 0)); +// for (BlockPos placePos : posList) +// { +// world.setBlockState(placePos, Blocks.REDSTONE_BLOCK.getDefaultState()); +// } +// } + +// for (Direction facing : Direction.HORIZONTALS) + for (int k = 0; k < 4; k++) + { + Direction facing = Direction.byHorizontalIndex(k); + List doorList = room.getDoorOffsetsForFacing(settings, facing, offsetPos); + for (BlockPos doorPos : doorList) + { + System.out.print("Door at " + doorPos + " facing " + facing + '\n'); + } + } + j++; + } + i++; + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/structures/DungeonUtil.java b/src/main/java/wayoftime/bloodmagic/structures/DungeonUtil.java new file mode 100644 index 00000000..e302e03d --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/DungeonUtil.java @@ -0,0 +1,55 @@ +package wayoftime.bloodmagic.structures; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import net.minecraft.util.Direction; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.gen.feature.template.PlacementSettings; + +public class DungeonUtil +{ + public static Direction rotate(Mirror mirror, Rotation rotation, Direction original) + { + return rotation.rotate(mirror.mirror(original)); + } + + public static Direction reverseRotate(Mirror mirror, Rotation rotation, Direction original) + { + return mirror.mirror(getOppositeRotation(rotation).rotate(original)); + } + + public static Direction getFacingForSettings(PlacementSettings settings, Direction original) + { + return rotate(settings.getMirror(), settings.getRotation(), original); + } + + public static Rotation getOppositeRotation(Rotation rotation) + { + switch (rotation) + { + case CLOCKWISE_90: + return Rotation.COUNTERCLOCKWISE_90; + case COUNTERCLOCKWISE_90: + return Rotation.CLOCKWISE_90; + default: + return rotation; + } + } + + public static void addRoom(Map> doorMap, Direction facing, BlockPos offsetPos) + { + if (doorMap.containsKey(facing)) + { + doorMap.get(facing).add(offsetPos); + } else + { + List doorList = new ArrayList<>(); + doorList.add(offsetPos); + doorMap.put(facing, doorList); + } + } +} diff --git a/src/main/java/wayoftime/bloodmagic/structures/ItemDungeonTester.java b/src/main/java/wayoftime/bloodmagic/structures/ItemDungeonTester.java new file mode 100644 index 00000000..d5527888 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/ItemDungeonTester.java @@ -0,0 +1,29 @@ +package wayoftime.bloodmagic.structures; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; +import wayoftime.bloodmagic.BloodMagic; + +public class ItemDungeonTester extends Item +{ + public ItemDungeonTester() + { + super(new Item.Properties().maxStackSize(1).group(BloodMagic.TAB)); + } + + @Override + public ActionResult onItemRightClick(World world, PlayerEntity player, Hand hand) + { + if (!world.isRemote && world instanceof ServerWorld) + { + System.out.println("Test"); + DungeonTester.testDungeonElementWithOutput((ServerWorld) world, player.getPosition()); + } + return super.onItemRightClick(world, player, hand); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/structures/ModDungeons.java b/src/main/java/wayoftime/bloodmagic/structures/ModDungeons.java new file mode 100644 index 00000000..6c066b6e --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/structures/ModDungeons.java @@ -0,0 +1,28 @@ +package wayoftime.bloodmagic.structures; + +public class ModDungeons +{ + public static void init() + { +// ResourceLocation resource = new ResourceLocation(Constants.Mod.MODID, "HallChest1"); +// +// Map structureMap = new HashMap(); +// structureMap.put(resource.toString(), new BlockPos(0, 0, 0)); +// +// Map> doorMap = new HashMap>(); +// List descriptorList = new ArrayList(); +// descriptorList.add(new AreaDescriptor.Rectangle(new BlockPos(0, 0, 0), 12, 5, 9)); +// +// DungeonUtil.addRoom(doorMap, EnumFacing.EAST, new BlockPos(11, 0, 4)); +// DungeonUtil.addRoom(doorMap, EnumFacing.WEST, new BlockPos(0, 0, 4)); +// +// DungeonRoom room = new DungeonRoom(structureMap, doorMap, descriptorList); +// DungeonRoomLoader.saveSingleDungeon(room); +// +// DungeonRoomRegistry.registerDungeonRoom(room, 1); +// +// DungeonRoomLoader.saveDungeons(); + + DungeonRoomLoader.loadDungeons(); + } +} diff --git a/src/main/resources/assets/bloodmagic/schematics/four_way_corridor.json b/src/main/resources/assets/bloodmagic/schematics/four_way_corridor.json new file mode 100644 index 00000000..620a3d0f --- /dev/null +++ b/src/main/resources/assets/bloodmagic/schematics/four_way_corridor.json @@ -0,0 +1,56 @@ +{ + "dungeonWeight": 4, + "structureMap": { + "bloodmagic:four_way_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": 0, + "z": 5 + } + ], + "east": [ + { + "x": 10, + "y": 0, + "z": 5 + } + ] + }, + "descriptorList": [ + { + "minimumOffset": { + "x": 0, + "y": 0, + "z": 0 + }, + "maximumOffset": { + "x": 11, + "y": 6, + "z": 11 + }, + "blockPosCache": [], + "cache": true + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/four_way_corridor_loot.json b/src/main/resources/assets/bloodmagic/schematics/four_way_corridor_loot.json new file mode 100644 index 00000000..6ceff35d --- /dev/null +++ b/src/main/resources/assets/bloodmagic/schematics/four_way_corridor_loot.json @@ -0,0 +1,56 @@ +{ + "dungeonWeight": 1, + "structureMap": { + "bloodmagic:four_way_corridor_loot": { + "x": 0, + "y": 0, + "z": 0 + } + }, + "doorMap": { + "north": [ + { + "x": 5, + "y": 5, + "z": 0 + } + ], + "south": [ + { + "x": 5, + "y": 5, + "z": 10 + } + ], + "west": [ + { + "x": 0, + "y": 5, + "z": 5 + } + ], + "east": [ + { + "x": 10, + "y": 5, + "z": 5 + } + ] + }, + "descriptorList": [ + { + "minimumOffset": { + "x": 0, + "y": 0, + "z": 0 + }, + "maximumOffset": { + "x": 11, + "y": 11, + "z": 11 + }, + "blockPosCache": [], + "cache": true + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/ore_hold_1.json b/src/main/resources/assets/bloodmagic/schematics/ore_hold_1.json new file mode 100644 index 00000000..42d9f1a6 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/schematics/ore_hold_1.json @@ -0,0 +1,69 @@ +{ + "dungeonWeight": 8, + "structureMap": { + "bloodmagic:ore_hold_1": { + "x": 0, + "y": 0, + "z": 0 + } + }, + "doorMap": { + "north": [ + { + "x": 5, + "y": 0, + "z": 0 + }, + { + "x": 2, + "y": 5, + "z": 0 + }, + { + "x": 12, + "y": 5, + "z": 0 + } + ], + "south": [ + { + "x": 5, + "y": 0, + "z": 14 + }, + { + "x": 2, + "y": 5, + "z": 14 + }, + { + "x": 12, + "y": 5, + "z": 14 + } + ], + "west": [ + { + "x": 0, + "y": 5, + "z": 7 + } + ] + }, + "descriptorList": [ + { + "minimumOffset": { + "x": 0, + "y": 0, + "z": 0 + }, + "maximumOffset": { + "x": 15, + "y": 12, + "z": 15 + }, + "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 new file mode 100644 index 00000000..309877d8 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/schematics/schematics.json @@ -0,0 +1,3 @@ +[ + "bloodmagic:t_corridor" +] \ 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 new file mode 100644 index 00000000..7bfc97e8 --- /dev/null +++ b/src/main/resources/assets/bloodmagic/schematics/straight_corridor.json @@ -0,0 +1,42 @@ +{ + "dungeonWeight": 4, + "structureMap": { + "bloodmagic:straight_corridor": { + "x": 0, + "y": 0, + "z": 0 + } + }, + "doorMap": { + "west": [ + { + "x": 0, + "y": 0, + "z": 2 + } + ], + "east": [ + { + "x": 10, + "y": 0, + "z": 2 + } + ] + }, + "descriptorList": [ + { + "minimumOffset": { + "x": 0, + "y": 0, + "z": 0 + }, + "maximumOffset": { + "x": 11, + "y": 5, + "z": 5 + }, + "blockPosCache": [], + "cache": true + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/schematics/t_corridor.json b/src/main/resources/assets/bloodmagic/schematics/t_corridor.json new file mode 100644 index 00000000..4fc3ec4a --- /dev/null +++ b/src/main/resources/assets/bloodmagic/schematics/t_corridor.json @@ -0,0 +1,49 @@ +{ + "dungeonWeight": 12, + "structureMap": { + "bloodmagic:t_corridor": { + "x": 0, + "y": 0, + "z": 0 + } + }, + "doorMap": { + "north": [ + { + "x": 5, + "y": 0, + "z": 0 + } + ], + "west": [ + { + "x": 0, + "y": 0, + "z": 5 + } + ], + "east": [ + { + "x": 10, + "y": 0, + "z": 5 + } + ] + }, + "descriptorList": [ + { + "minimumOffset": { + "x": 0, + "y": 0, + "z": 0 + }, + "maximumOffset": { + "x": 11, + "y": 5, + "z": 8 + }, + "blockPosCache": [], + "cache": true + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_ore.png b/src/main/resources/assets/bloodmagic/textures/block/dungeon/dungeon_ore.png new file mode 100644 index 0000000000000000000000000000000000000000..3771f3a2a5e948953bd2d1621c99fe1c9e5fca50 GIT binary patch literal 7090 zcmeHLc{r49+aHfojmVOsRAb0iV^%X}vXrrB8B1A0&2rBe#>|)*W~h**QmGK_Wh*IZ zK?y~vSHdGD6e22lC7}hO?;d(e@B4hu`#s0;z5nGnn7PjDcmB@v`d#OFUH2`4;%ut` zT>^zbAPV+&R&L;@lJs}39Qb#|@K-7XB1eqy@DjOE#W22r$7FK=m?)eNzyJxG34utS zUGxm%VhQudFS&o1tCHIj@?lm)?DFy~HG?(Izb$;zlPGSE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ik;dySFN&K!@iE3+$4VYe)IuUwnHz;!F3HAo}ipLArn@bn5X}y z7nhuO@KI4t^!|1&^$&w)2ORP1bAqwPSf~E-9X@rs%UWNzUur($oEWl|E~}mT`o-^N z@Zg%R8@=op{{uc*w?ocY1_tcrUXRtWF1}LY(Ap<>gER2aEm_#zH3To`e2qTktewXV z-WB>-C#5E2@?*2UkM8I4uL&s|RS|3@7oB1eJs}eqYHd28qaa&{k`xxip6{D`IITl| zIR3XpABA-r4$=+l^nk+bbr+bK8gkXOsIV&LYR`06Lb#h@QlsdD2#QXr8FU#$`qpQ; z2f;p$?K5AqV}P_fNq^63?N73TUS-WMan}H}_?_m>^aDZSk;PZS5_m1IOax%ZLF}!a Kt@16m#QYD2s37A2 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodmagic/textures/item/dungeon_tester.png b/src/main/resources/assets/bloodmagic/textures/item/dungeon_tester.png new file mode 100644 index 0000000000000000000000000000000000000000..8a46b4d188f8068f66907c8ddb5b291fc53b8b69 GIT binary patch literal 902 zcmV;119|+3P)EX>4Tx04R}tkv&MmKpe$iQ$;D23U*L&$WWauh>AE$6^me@v=v%)FuC*#nlvOS zE{=k0!NHHks)LKOt`4q(Aou~|}?mh0_0Yam~RI_UWP&La) z#baVNw<`9$B7h-;5kkMjOg)ia%)oPe-NVP%yC~1{KKJM7Q}QMQd?N82(+!JwgLr1s z(mC%FhgnHdh|h_~4Z0xlBiCh@-#8Z?7I5bWxZD8-pLEHP9LY~pC=`JAGy0|+FmMY5*4*A&`#607GSt=b4RCM> zj1?(+-Q(T8oxS~grq$mMVS;j?z&5&G00006VoOIv00000008+zyMF)x010qNS#tmY z4X^+J4X^=yWm)D^0}kD3U1R_N0fR|IK~y-)?NYHz0&y697lH;3 z28WJi(Nrf6dVj#xU{Df4gB(FxEiTb|4kZST?zNjOx)szvP#0zyE{2QTpx)x|60$q% zYqBV=h@h=EeSGlV_uk_J{_!mqA`y}#iGD?n#bVTKHYt&alPHG26dAEwiei`qLBMgL zfGPhZ&d$!Uy0T0^5|AW`LZL9|y-t~Qn#$!er4)sBwzo;sG}_wSq*AFws;bib+`E&v z2>$U29Od)K<#M=hG~o03upW>(Gzz!djnk78 z+*WUKadFAn3Jkj#^NeA4Zx4(ya2$tryN$zx0}P%AAIP=>Lj(f>a*d9{;c&osFi@@D caewmeuPrUE9Q^U99smFU07*qoM6N<$f{|&I761SM literal 0 HcmV?d00001 diff --git a/src/main/resources/data/bloodmagic/structures/four_way_corridor.nbt b/src/main/resources/data/bloodmagic/structures/four_way_corridor.nbt new file mode 100644 index 0000000000000000000000000000000000000000..e8a47680137256f6db3ac5776d8fe01b40a3c1a0 GIT binary patch literal 2055 zcmZux2~<<*6=spJBnSn^1QltNvW!B)Bp|Yw4z$rh77;32fP{_#=D;X0Pyqu`Fariz zWEetZ>oAfdTOx3RA%I|lz>okjghhl@#AJrB$Pz%-zF@6wPv3dx{rCR&zVCkDyZ3)) zR2{Vsm+(PIg7JC7JL|Udjx!#=*M+Oc?}1(9XNwqZt%sY~ErHFS&$oJRB)`8Z3U;bd z4v881?93XRt$?wBA`PR2b#cD_*dS?Jz1ZsRb7qw?z%C6@mD~=a|NYTc)XgH_rJv@# z!<4pnr}uub3QcmI$_$`mlQI78?WFJdUxO?vka1*dNE}hm_$WF<0NoPf6VY6^y_CpyhR7WO~_QJpy3?b3OOk|>0vd;kgxfZuq% zrG-_1k-_0)(WXYu2o&GkWVF9@s8uPoVD&&5k{#*>fT)op(}D@X$d>@TGq5e+_vrtk zBG6Z=S4p&Uu9zW%Nu5zjYkhiG)Tg`bOBBot1)HxsurKp?xSa?>5xzd{9g|fEn>MF7 z_V&mmr@TNEVeLsC@o52}N!rUI71e_w69MC`oh;Y8Dzl2Vh#%|dn*M>}IAGXgGM&TB zGsomN7aYpW?d_(PH3TADXJ+kg8mZBW(W$hj@83~UG#RsN8PP|3f=^oLdD4{E+ z5C!5e1I>?9!C2mI0Rfv-DSIH$NF!ty@$b+A0_nYgkjZY9rbt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2m!lKk@Jyawjer6WVsN@F@j3&__ga(xg`9xc5eDPJ6~4HT!--4ljrs z8N079d;9t~Ynz9scc-_v2`$a{m6r`>R()Cfo!zeI^1$R8f>UGYMn*-EeA&D6+SDoe zovIvT@1iY^pL1;RmpabW_SmMJ@rmG^8xBdA4R-zX#J;>FG}SZ4Lf%#1u-K+CxLBFo zIQ_Blm-eJ0T|4n~gy}&i&aiR}K2QB-$8!B{^MZ5CsHhm1Jmcnm<$<#nFv||ByaQ+|@_hmSA9Pp(SMhEXe&reLGIVZpw`TWW+oC#j~Li9b~?$Dp@M+iy6m-}=i8ZQ$4cI5Eu3OKrP7c`ac4&8PiDx&feS@lG0cAIX4ZVn Ol-)^wb7Lq~LE#@UG`kf5 literal 0 HcmV?d00001 diff --git a/src/main/resources/data/bloodmagic/structures/ore_hold_1.nbt b/src/main/resources/data/bloodmagic/structures/ore_hold_1.nbt new file mode 100644 index 0000000000000000000000000000000000000000..6ecc7b1e9591a725b1b0d4289f29dabee2bfa880 GIT binary patch literal 9256 zcmb7p3s{rK(!XetRuo!A2*pS}^R%HtfR4X==Ad!+evRgz+g-Nlh7K^()9gYAZiRmNZPej+H}A|Kzhb&( zZ^zQ6xjXNkKNha~cFa3|=Zl($O_RTgQ;*uSX7J5Jqb2+%Mq&R{ovzfNu!AjOnSq z5jSc#UKg8cH-0P5)o#oZ)3h7&#Y*kQ4DmMYMyFW2O^vUAwKl0zoYn_g*y+i2 z&mT^;^~Drtf1+RtZUpyW>`{GE;9=jkIH_EZ8`M*ns|X6c$kdx(XL(t5U1I9Ur+k!# zs7=$)&G&L#=+Tk(-UY|P+s54c{)qJaxrZ}&_x*7>e0e*i}HRary&-j#bo_`nHt%eyLyK$d8C4jcKzLu9Ia`s_5%d zdlTkXEX>Cy{{ZC}A>c732mVK7%;`^2mY)+GOA64S+Wk$o*5tSWA;4TCX@JSKGOo>> z!ee2t*)X_P4DS5{sI_9?h}E5?zRHDQe=F2A+=MlcF-FAg*W~$l9MP?_>?N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+S*<)abjUij7liJE?qmB&%RgrgPlaSkt9h;F`T5;nX>|^# z<`gFAI+PDNoBIs!)ec!M>>jYNfi#3H4RDP^X&P5X?Ulf^A1^Gdc`&R zond<~;wXD}>6L@(9+pZeXEg*)+q?c$plqq|-ETC+epB^1{hxwe<~bj|r5q+F&lJ%r z)3+DUnoC}}csJECeQG#pGV{9vc1NbUX8$2~WuebJr=(*>!E;YPMoeb*jaCi`$1?VQ zm2!0SWaNzVJN{Y=Eu(`Pwy)``YVeC=L-%GLY?H`m)54@nZ_io>rXuD$ zu`Azdbg*bH@@l71%(Oi%V2rMsly6ZizR-Kv_KT1pTlKe}hugR|r7SR}TXl;PS*@4D z|Fc7P^Osd0jP5p54O|^r4F8xue!ru-+d53$?P~5|SN-Z#-`9yXBmVc69wxcV_e8(_ zuddPM3*+K_m6-L!wai_l^Nme8*#w_L%Mh#BdlAe&5`)SA&~L8iz=z*Is>;KMd|f;F zzk@lfZ_GpkUl|YF$acl?`~4km-#NW+K$o7DetFLSEPK&mUlZvQoxa#cn``2;b+P7t h@gcmfv_r`ETQU`5$u47rF)?H@yLWahg{|_(+a8m#P literal 0 HcmV?d00001 diff --git a/src/main/resources/data/bloodmagic/structures/straight_corridor.nbt b/src/main/resources/data/bloodmagic/structures/straight_corridor.nbt new file mode 100644 index 0000000000000000000000000000000000000000..0f244757980d555083c07bc4798e1351c78b1282 GIT binary patch literal 1210 zcmZXRe@s(X6vtnwElgS&!6H8_F0i8jyn2O2>0(g*GM{ zHiQw(sx=h`g$9sPwxN$Q;Kd>}BA`@kksm8VTY-WD)D9}J2j!n-Hzzme-h9vZeC|D4 zeslut>!I}IxuJaR1Q%UA!TKa4-W&C4L55M54Ls}14nh!(A)&Wcby4(20?#UoR*@z9WNf0 z7Eq84dg1(KfN()pfF4Jc!4&W}9GXZAntAtdS2MR>&4eO@Df(_D0@C$3le*b|CnzAI zh9}RYz=A6t)1jz09hHE=l%dI69!fL@u-zSeGk*1|If|g)EJ{m(C(+Ifdm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