From 911b6dc95c7cfbd6dc17dd8ca7cce5add958f315 Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Sun, 8 Dec 2019 01:54:49 -0500 Subject: [PATCH 01/23] initial version commit --- Treasure2-1.12.2/gradle.properties | 2 +- .../src/com/someguyssoftware/treasure2/Treasure.java | 2 +- Treasure2-1.12.2/src/resources/mcmod.info | 2 +- Treasure2-1.12.2/update.json | 7 ++++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Treasure2-1.12.2/gradle.properties b/Treasure2-1.12.2/gradle.properties index dd29657c8..0156ab1a4 100644 --- a/Treasure2-1.12.2/gradle.properties +++ b/Treasure2-1.12.2/gradle.properties @@ -7,7 +7,7 @@ package_group=someguyssoftware.treasure2 # user alpha, beta, or v (for version) mod_version_type=v -mod_version=1.7.0 +mod_version=1.8.0 #versions mc_version=1.12.2 diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java index 024c9a00c..9f4268131 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java @@ -87,7 +87,7 @@ public class Treasure extends AbstractMod { // constants public static final String MODID = "treasure2"; protected static final String NAME = "Treasure2"; - protected static final String VERSION = "1.7.0"; + protected static final String VERSION = "1.8.0"; public static final String UPDATE_JSON_URL = "https://raw.githubusercontent.com/gottsch/gottsch-minecraft-Treasure/master/Treasure2-1.12.2/update.json"; diff --git a/Treasure2-1.12.2/src/resources/mcmod.info b/Treasure2-1.12.2/src/resources/mcmod.info index d331e6fd1..05e977d49 100644 --- a/Treasure2-1.12.2/src/resources/mcmod.info +++ b/Treasure2-1.12.2/src/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "treasure2", "name": "Treasure2!", "description": "", - "version": "1.7.0", + "version": "1.8.0", "mcversion": "1.12.2", "url": "", "updateUrl": "", diff --git a/Treasure2-1.12.2/update.json b/Treasure2-1.12.2/update.json index 201bbcb4f..4f55e59b1 100644 --- a/Treasure2-1.12.2/update.json +++ b/Treasure2-1.12.2/update.json @@ -1,8 +1,8 @@ { "homepage": "https://minecraft.curseforge.com/projects/treasure2", "promos": { - "1.12.2-latest": "1.7.0", - "1.12.2-recommended": "1.7.0" + "1.12.2-latest": "1.8.0", + "1.12.2-recommended": "1.8.0" }, "1.12.2": { "0.5.0": "alpha release", @@ -32,7 +32,8 @@ "1.6.1": "Fixed NPE on AbstractTreasureChest", "1.6.2": "Removed GUI config that was inadvertently added last update.", "1.6.3": "Removed debugging code that was causing underwater structures to generate too frequently.", - "1.7.0": "Refactored config files into one GUI config.\nAdded Desert Wishing Well block.\nFixed Rarity enum value mappings.\nPersisted ChestRegistry.\nFixed Well generation on podzol/mycelium generating mushroom block instead of mushrooms.\nReconfigured folder locations where logging and resource files go (moved out of /mods folder.)\nUsing GottschCore v1.9.0.\n*Fixed chests not generating in some pits.\n*Fixed world properties not clearing between game world loads.\nFixed loading of ChestRegistry.\n" + "1.7.0": "Refactored config files into one GUI config.\nAdded Desert Wishing Well block.\nFixed Rarity enum value mappings.\nPersisted ChestRegistry.\nFixed Well generation on podzol/mycelium generating mushroom block instead of mushrooms.\nReconfigured folder locations where logging and resource files go (moved out of /mods folder.)\nUsing GottschCore v1.9.0.\n*Fixed chests not generating in some pits.\n*Fixed world properties not clearing between game world loads.\nFixed loading of ChestRegistry.\n", + "1.8.0": "" } } From a7a14c453638bc1629bf9e040a66946fc2f2164c Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Mon, 9 Dec 2019 17:23:04 -0500 Subject: [PATCH 02/23] -fix commands. --- .../treasure2/command/SpawnPitCommand.java | 5 ++++- .../treasure2/command/SpawnWitherTreeCommand.java | 9 ++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnPitCommand.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnPitCommand.java index 755bc922d..30cb98953 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnPitCommand.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnPitCommand.java @@ -6,7 +6,10 @@ import java.util.Random; import com.someguyssoftware.gottschcore.positional.Coords; +import com.someguyssoftware.gottschcore.positional.ICoords; import com.someguyssoftware.treasure2.Treasure; +import com.someguyssoftware.treasure2.config.IChestConfig; +import com.someguyssoftware.treasure2.config.TreasureConfig; import com.someguyssoftware.treasure2.enums.Rarity; import com.someguyssoftware.treasure2.enums.WorldGenerators; import com.someguyssoftware.treasure2.generator.chest.IChestGenerator; @@ -65,7 +68,7 @@ public void execute(MinecraftServer server, ICommandSender commandSender, String // chestGen.getGenerators().get(rarity).generate(world, random, new Coords(x, y, z), rarity, Configs.chestConfigs.get(rarity)); SurfaceChestWorldGenerator chestGens = (SurfaceChestWorldGenerator) Treasure.WORLD_GENERATORS.get(WorldGenerators.SURFACE_CHEST); IChestGenerator gen = chestGens.getChestGenMap().get(rarity).next(); - gen.generate(world, random, new Coords(x, y, z), rarity, null); + SurfaceChestWorldGenerator.generatePit(world, random, rarity, new Coords(x, y, z), TreasureConfig.CHESTS.surfaceChests.configMap.get(rarity)); } } catch(Exception e) { diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnWitherTreeCommand.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnWitherTreeCommand.java index 29c4e511b..0bdb6f331 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnWitherTreeCommand.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnWitherTreeCommand.java @@ -5,7 +5,10 @@ import java.util.Random; +import com.someguyssoftware.gottschcore.positional.Coords; import com.someguyssoftware.treasure2.Treasure; +import com.someguyssoftware.treasure2.config.TreasureConfig; +import com.someguyssoftware.treasure2.worldgen.WitherTreeWorldGenerator; import net.minecraft.command.CommandBase; import net.minecraft.command.ICommandSender; @@ -43,13 +46,13 @@ public void execute(MinecraftServer server, ICommandSender commandSender, String if (player != null) { World world = commandSender.getEntityWorld(); - Treasure.logger.debug("Starting to build Treasure! wishing well ..."); + Treasure.logger.debug("Starting to build Treasure! wither tree ..."); Random random = new Random(); //BlockPos pos = new BlockPos(x, y, z); // TODO get this to work -// WitherTreeGenerator gen = new WitherTreeGenerator(); -// gen.generate(world, random, new Coords(x, y, z), TreasureConfig.WITHER_TREE); //Configs.witherTreeConfig); + WitherTreeWorldGenerator gen = new WitherTreeWorldGenerator(); + gen.generate(world, random, new Coords(x, y, z), TreasureConfig.WITHER_TREE); } } catch(Exception e) { From 6d51c64407733622c7d1617ef0d6abdaca474564 Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Fri, 13 Dec 2019 06:37:25 -0500 Subject: [PATCH 03/23] setting up decay processor --- Treasure2-1.12.2/gradle.properties | 2 +- .../treasure2/world/gen/structure/TemplateGenerator.java | 1 + Treasure2-1.12.2/update.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Treasure2-1.12.2/gradle.properties b/Treasure2-1.12.2/gradle.properties index 0156ab1a4..a5682086a 100644 --- a/Treasure2-1.12.2/gradle.properties +++ b/Treasure2-1.12.2/gradle.properties @@ -13,7 +13,7 @@ mod_version=1.8.0 mc_version=1.12.2 forge_version=14.23.5.2768 mappings_version=snapshot_20171003 -gottschcore_version=1.9.0 +gottschcore_version=1.10.0 # paths dest_folder=E:/Minecraft/mods/1.12.2/ \ No newline at end of file diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java index 8cdb41cb3..3f20180f4 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java @@ -86,6 +86,7 @@ public GeneratorResult generate(World world, Random rando // update the spawn coords with the offset ICoords spawnCoords = coords.add(0, offset, 0); + // TODO provide decayProcessor // generate the structure template.addBlocksToWorld(world, spawnCoords.toPos(), placement, getNullBlock(), Treasure.TEMPLATE_MANAGER.getReplacementMap(), 3); diff --git a/Treasure2-1.12.2/update.json b/Treasure2-1.12.2/update.json index 4f55e59b1..1b3bdc5fb 100644 --- a/Treasure2-1.12.2/update.json +++ b/Treasure2-1.12.2/update.json @@ -33,7 +33,7 @@ "1.6.2": "Removed GUI config that was inadvertently added last update.", "1.6.3": "Removed debugging code that was causing underwater structures to generate too frequently.", "1.7.0": "Refactored config files into one GUI config.\nAdded Desert Wishing Well block.\nFixed Rarity enum value mappings.\nPersisted ChestRegistry.\nFixed Well generation on podzol/mycelium generating mushroom block instead of mushrooms.\nReconfigured folder locations where logging and resource files go (moved out of /mods folder.)\nUsing GottschCore v1.9.0.\n*Fixed chests not generating in some pits.\n*Fixed world properties not clearing between game world loads.\nFixed loading of ChestRegistry.\n", - "1.8.0": "" + "1.8.0": "Add SpawnRuins command.\nFix/enable other spawn commands.\n" } } From db667b13358454af2ec2e8f39334da0d4c69dbf4 Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Fri, 13 Dec 2019 07:13:44 -0500 Subject: [PATCH 04/23] add spanish language file by OdinsRagnarok. Original pull request/merge got messed up. Re-adding. --- .../assets/treasure2/lang/es_ES.lang | 208 ++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 Treasure2-1.12.2/src/resources/assets/treasure2/lang/es_ES.lang diff --git a/Treasure2-1.12.2/src/resources/assets/treasure2/lang/es_ES.lang b/Treasure2-1.12.2/src/resources/assets/treasure2/lang/es_ES.lang new file mode 100644 index 000000000..03b6b4b54 --- /dev/null +++ b/Treasure2-1.12.2/src/resources/assets/treasure2/lang/es_ES.lang @@ -0,0 +1,208 @@ +#####Translation into Spanish by OdinsRagnarok##### + +#chests +tile.treasure2:wood_chest.name=Cofre De Madera +tile.treasure2:crate_chest.name=Cajn +tile.treasure2:crate_chest_moldy.name=Cajn Mohoso +tile.treasure2:ironbound_chest.name=Cofre de Hierro +tile.treasure2:iron_strongbox.name=Caja Fuerte de Hierro +tile.treasure2:gold_strongbox.name=Caja Fuerte de Oro +tile.treasure2:pirate_chest.name=Cofre Del Pirata +tile.treasure2:safe.name=Caja Fuerte +tile.treasure2:dread_pirate_chest.name=Cofre Del Pirata Temible +tile.treasure2:compressor_chest.name=Cofre Compresor +tile.treasure2:wither_chest.name=Cofre Marchito +tile.treasure2:skull_chest.name=Cofre Calavera +tile.treasure2:gold_skull_chest.name=Cofre Calavera Dorada +tile.treasure2:cauldron_chest.name=Cofre Caldero +tile.treasure2:oyster_chest.name=Ostra +tile.treasure2:clam_chest.name=Almeja + +tile.treasure2:wood_mimic.name=Imitador de Madera + + +#wells +tile.treasure2:wishing_well_block.name=Piedra de Pozo de los Deseos +tile.treasure2:desert_wishing_well_block.name=Piedra de Pozo de los Deseos del Desierto + + +#gravestones +tile.treasure2:gravestone1_stone.name=Lpida de Piedra +tile.treasure2:gravestone1_cobblestone.name=Lpida de Adoquines +tile.treasure2:gravestone1_mossy_cobblestone.name=Lpida de Adoquines Musgosos +tile.treasure2:gravestone1_polished_granite.name=Lpida de Granito +tile.treasure2:gravestone1_polished_andesite.name=Lpida de Andesita +tile.treasure2:gravestone1_polished_diorite.name=Lpida de Diorita +tile.treasure2:gravestone1_obsidian.name=Lpida de Obsidiana + +tile.treasure2:gravestone2_stone.name=Lpida de Piedra +tile.treasure2:gravestone2_cobblestone.name=Lpida de Adoquines +tile.treasure2:gravestone2_mossy_cobblestone.name=Lpida de Adoquines Musgosos +tile.treasure2:gravestone2_polished_granite.name=Lpida de Granito +tile.treasure2:gravestone2_polished_andesite.name=Lpida de Andesita +tile.treasure2:gravestone2_polished_diorite.name=Lpida de Diorita +tile.treasure2:gravestone2_obsidian.name=Lpida de Obsidiana + +tile.treasure2:gravestone3_stone.name=Lpida de Piedra +tile.treasure2:gravestone3_cobblestone.name=Lpida de Adoquines +tile.treasure2:gravestone3_mossy_cobblestone.name=Lpida de Adoquines Musgosos +tile.treasure2:gravestone3_polished_granite.name=Lpida de Granito +tile.treasure2:gravestone3_polished_andesite.name=Lpida de Andesita +tile.treasure2:gravestone3_polished_diorite.name=Lpida de Diorita +tile.treasure2:gravestone3_obsidian.name=Lpida de Obsidiana + +tile.treasure2:skull_and_crossbones.name=Calavera y Huesos +tile.treasure2:skeleton.name=Esqueleto + + +#wither tree +tile.treasure2:wither_log.name=Tronco Marchito +tile.treasure2:wither_broken_log.name=Tronco Roto Marchito +tile.treasure2:wither_log_soul.name=Alma de Tronco Marchito +tile.treasure2:wither_branch.name=Rama Marchita +tile.treasure2:wither_root.name=Raz Marchita +tile.treasure2:wither_planks.name=Tablones Marchitos + + +#fogs +tile.treasure2:fog.name=Niebla +tile.treasure2:high_fog.name=Niebla Alta +tile.treasure2:med_fog.name=Niebla Media +tile.treasure2:low_fog.name=Niebla Baja + +tile.treasure2:wither_fog.name=Niebla Marchita +tile.treasure2:high_wither_fog.name=Niebla Marchita Alta +tile.treasure2:med_wither_fog.name=Niebla Marchita Media +tile.treasure2:low_wither_fog.name=Niebla Marchita Baja + +tile.treasure2:poison_fog.name=Niebla Venenosa +tile.treasure2:high_poison_fog.name=Niebla Venenosa Alta +tile.treasure2:med_poison_fog.name=Niebla Venenosa Media +tile.treasure2:low_poison_fog.name=Niebla Venenosa Baja + + +#ores +tile.treasure2:sapphire_ore.name=Mena de Zafiro +tile.treasure2:ruby_ore.name=Mena de Rub + + +#other +tile.treasure2:spanish_moss.name=Musgo Espaol + + +#items +item.treasure2:gold_coin.name=Moneda de Oro +item.treasure2:silver_coin.name=Moneda de Plata + +item.treasure2:key_ring.name=Llavero +item.treasure2:wood_key.name=LLave de Madera +item.treasure2:stone_key.name=LLave de Piedra +item.treasure2:iron_key.name=LLave de Hierro +item.treasure2:gold_key.name=LLave de Oro +item.treasure2:diamond_key.name=LLave de Diamante +item.treasure2:emerald_key.name=LLave de Esmeralda +item.treasure2:ruby_key.name=LLave de Rub +item.treasure2:sapphire_key.name=LLave de Zafiro +item.treasure2:jewelled_key.name=LLave Enjoyada +item.treasure2:metallurgists_key.name=Llaves del Metalurgo +item.treasure2:skeleton_key.name=LLave del Esqueleto +item.treasure2:spider_key.name=LLave Arcnida +item.treasure2:wither_key.name=LLave Marchita +item.treasure2:shucking_knife.name=Navaja + +item.treasure2:wood_lock.name=Cerradura de Madera +item.treasure2:stone_lock.name=Cerradura de Piedra +item.treasure2:iron_lock.name=Cerradura de Hierro +item.treasure2:gold_lock.name=Cerradura de Oro +item.treasure2:diamond_lock.name=Cerradura de Diamante +item.treasure2:emerald_lock.name=Cerradura de Esmeralda +item.treasure2:ruby_lock.name=Cerradura de Rub +item.treasure2:sapphire_lock.name=Cerradura de Zafiro +item.treasure2:spider_lock.name=Cerradura Arcnida +item.treasure2:wither_lock.name=Cerradura Marchita + +item.treasure2:wither_stick_item.name=Rama Marchita +item.treasure2:wither_root_item.name=Raz Marchita +item.treasure2:pilferers_lock_pick.name=Garza del Ladronzuelo +item.treasure2:thiefs_lock_pick.name=Garza del Ladrn + +item.treasure2:painting_blocks_bricks.name=Ladrillos por o2xygeno +item.treasure2:painting_blocks_cobblestone.name=Guijarros por o2xygeno +item.treasure2:painting_blocks_dirt.name=Tierra por o2xygeno +item.treasure2:painting_blocks_lava.name=Lava por o2xygeno +item.treasure2:painting_blocks_sand.name=Arena por o2xygeno +item.treasure2:painting_blocks_water.name=Agua por o2xygeno +item.treasure2:painting_blocks_wood.name=Madera por o2xygeno + +item.treasure2:eye_patch.name=Parche +item.treasure2:skull_sword.name=Espada Calavera +item.treasure2:spanish_moss.name=Musgo Espaol +item.treasure2:sapphire.name=Zafiro +item.treasure2:ruby.name=Rub +item.treasure2:skeleton_item.name=Esqueleto +item.treasure2:white_pearl.name=Perla Blanca +item.treasure2:black_pearl.name=Perla Negra +item.treasure2:oyster_meat.name=Carne de Ostra +item.treasure2:oyster_stew.name=Estofado de Ostra +item.treasure2:clam_meat.name=Carne de Almeja +item.treasure2:clam_stew.name=Estofado de Almeja +item.treasure2:treasure_tool.name=Herramienta del Tesoro + + +#entities +#TODO rename standard to wood +entity.wood_mimic.name=Imitador de Madera + + +#groups +itemGroup.treasure2:treasure_tab=Tesoro2! + + +# string resources +tooltip.yes=S +tooltip.no=No +tooltip.label.rarity=Rareza: %s +tooltip.label.category=Categora: %s +tooltip.label.max_uses=Mx Usos: %s +tooltip.label.breakable=Rompible: %s +tooltip.label.craftable=Elaborable: %s +tooltip.label.damageable=Daable: %s +tooltip.label.specials=Especiales: %s +tooltip.label.accepts_keys=LLaves aceptadas: %s +tooltip.label.coin=Tirar al Pozo de los Deseos +tooltip.label.key_ring=Contenedor para Llaves +tooltip.label.treasure_tool=Requerido para recetas de Llaves / Garzas + +tooltip.label.max_locks=Mx de Cerraduras: %s +tooltip.label.container_size=Tamao del Inventario: %s + +tooltip.metallurgists_key.specials=Abre cualquier cerradura en la categora METALES +tooltip.skeleton_key.specials=Abre cerraduras COMUNES, NO COMUNES, ESCASAS y RARAS (excluyendo Marchita) +tooltip.pilferers_lock_pick.specials=Abre cerraduras COMUNES (%s%%) y NO COMUNES (%s%%) +tooltip.thiefs_lock_pick.specials=Abre cerraduras COMUNES (%s%%), NO COMUNES (%s%%) y ESCASAS (%s%%) +tooltip.jewelled_key.specials=Abre cualquier cerradura en la categora GEMAS + +tooltip.painting.name=%s +tooltip.painting.collection=Coleccin: %s +tooltip.painting.issue=Problema: %s/%s +tooltip.painting.artist=por %s + + +#gui +display.wood_chest.name=Cofre de Madera +display.crate_chest.name=Cajn +display.crate_chest_moldy.name=Cajn Mohoso +display.ironbound_chest.name=Cofre de Hierro +display.pirate_chest.name=Cofre Del Pirata +display.iron_strongbox.name=Caja Fuerte de Hierro +display.gold_strongbox.name=Caja Fuerte de Oro +display.safe.name=Caja Fuerte +display.dread_pirate_chest.name=Cofre Del Pirata Temible +display.compressor_chest.name=Cofre Compresor +display.wither_chest.name=Cofre Marchito +display.skull_chest.name=Cofre Calavera +display.gold_skull_chest.name=Cofre Calavera Dorada +display.cauldron_chest.name=Cofre Caldero +display.whale_bone_pirate_chest.name=Cofre Pirata de Hueso de Ballena +display.clam_chest.name=Almeja +display.oyster_chest.name=Ostra \ No newline at end of file From abe593fe19c4bcaf5138fd0ff07e128405d9e01c Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Fri, 13 Dec 2019 07:25:57 -0500 Subject: [PATCH 05/23] Creating ruins command for debugging. Adding decay ruleset. --- .../treasure2/command/SpawnRuinsCommand.java | 83 +++++++++++++++++++ .../src/resources/decay/default_ruleset.json | 20 +++++ 2 files changed, 103 insertions(+) create mode 100644 Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java create mode 100644 Treasure2-1.12.2/src/resources/decay/default_ruleset.json diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java new file mode 100644 index 000000000..6a0939f61 --- /dev/null +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java @@ -0,0 +1,83 @@ +/** + * + */ +package com.someguyssoftware.treasure2.command; + +import java.util.Random; + +import com.someguyssoftware.gottschcore.positional.Coords; +import com.someguyssoftware.gottschcore.positional.ICoords; +import com.someguyssoftware.treasure2.Treasure; +import com.someguyssoftware.treasure2.config.IChestConfig; +import com.someguyssoftware.treasure2.config.TreasureConfig; +import com.someguyssoftware.treasure2.enums.Rarity; +import com.someguyssoftware.treasure2.enums.WorldGenerators; +import com.someguyssoftware.treasure2.generator.chest.IChestGenerator; +import com.someguyssoftware.treasure2.worldgen.SurfaceChestWorldGenerator; + +import net.minecraft.command.CommandBase; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.server.MinecraftServer; +import net.minecraft.util.text.TextComponentString; +import net.minecraft.world.World; + +/** + * + * @author Mark Gottschling on Jan 25, 2018 + * + */ +public class SpawnRuinsCommand extends CommandBase { + + @Override + public String getName() { + return "t2-ruins"; + } + + @Override + public String getUsage(ICommandSender var1) { + return "/t2-ruins [name]: spawns a Treasure! ruins at location (x,y,z)"; + } + + @Override + public void execute(MinecraftServer server, ICommandSender commandSender, String[] args) { + EntityPlayer player = (EntityPlayer) commandSender.getCommandSenderEntity(); + try { + + int x, y, z = 0; + x = Integer.parseInt(args[0]); + y = Integer.parseInt(args[1]); + z = Integer.parseInt(args[2]); + + String ruinsName = ""; + if (args.length > 3) { + ruinsName = args[3]; + } + +// if (ruinsName.equals("")) ruinsName = Rarity.COMMON.name(); +// Rarity rarity = Rarity.valueOf(ruinsName.toUpperCase()); +// Treasure.logger.debug("Rarity:" + rarity + "; " + rarity.ordinal()); + + if (player != null) { + World world = commandSender.getEntityWorld(); + Treasure.logger.debug("Starting to build Treasure! ruins ..."); + + Random random = new Random(); + ICoords coords = new Coords(x, y, z); + + // TODO get the structure generator + + // TODO create a DecayProcessor + + // TODO pass the decay processor to the structure generator + + // TODO either get name of ruins or randomize selection of surface structures + } + } + catch(Exception e) { + player.sendMessage(new TextComponentString("Error: " + e.getMessage())); + Treasure.logger.error("Error generating Treasure! chest:", e); + e.printStackTrace(); + } + } +} diff --git a/Treasure2-1.12.2/src/resources/decay/default_ruleset.json b/Treasure2-1.12.2/src/resources/decay/default_ruleset.json new file mode 100644 index 000000000..132a28a90 --- /dev/null +++ b/Treasure2-1.12.2/src/resources/decay/default_ruleset.json @@ -0,0 +1,20 @@ + { + "verticalDecayRate": 1.0, + "initialBlockStrength": 100.0, + "blockStrengthThreshold": 0.0, + "blockStrengthDecayRate": 10.0, + "blockStrengthDistanceDecayRate": 25.0, + "decayRules": { + "minecraft:stonebrick@0": { + "block": "minecraft:stonebrick@0", + "decayIterations": 3, + "decayProbability": 15.0, + "decayBlocks": [ + "minecraft:stonebrick@1", + "minecraft:stonebrick@2", + "minecraft:cobblestone@0", + "minecraft:gravel@0" + ] + } + } +} \ No newline at end of file From 3109ecb4e6cc8da9e08ac5ad3e3380232450e6df Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Sat, 28 Dec 2019 00:13:47 -0500 Subject: [PATCH 06/23] -add decay processing ability --- Treasure2-1.12.2/build.gradle | 24 ++- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../someguyssoftware/treasure2/Treasure.java | 7 + .../treasure2/command/SpawnRuinsCommand.java | 92 +++++---- .../eventhandler/WorldEventHandler.java | 1 + .../generator/ruins/IRuinGenerator.java | 51 ++++- .../ruins/SubmergedRuinGenerator.java | 59 +++--- .../generator/ruins/SurfaceRuinGenerator.java | 179 ++++++++++++++++++ .../treasure2/meta/StructureMeta.java | 16 +- .../gen/structure/ITemplateGenerator.java | 9 +- .../gen/structure/TemplateGenerator.java | 21 +- .../world/gen/structure/TemplateHolder.java | 23 +++ .../gen/structure/TreasureDecayManager.java | 72 +++++++ .../structure/TreasureTemplateManager.java | 31 ++- .../worldgen/SurfaceChestWorldGenerator.java | 68 ++++++- .../worldgen/WitherTreeWorldGenerator.java | 5 +- .../src/resources/decay/default_ruleset.json | 20 -- .../decay/treasure2/default_ruleset.json | 54 ++++++ .../decay/treasure2/ruinous_ruleset.json | 47 +++++ .../meta/treasure2/structures/test-tower.json | 17 ++ .../treasure2/surface/test-small.nbt | Bin 0 -> 381 bytes .../treasure2/surface/test-tower.nbt | Bin 0 -> 3274 bytes 22 files changed, 685 insertions(+), 113 deletions(-) create mode 100644 Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java create mode 100644 Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TreasureDecayManager.java delete mode 100644 Treasure2-1.12.2/src/resources/decay/default_ruleset.json create mode 100644 Treasure2-1.12.2/src/resources/decay/treasure2/default_ruleset.json create mode 100644 Treasure2-1.12.2/src/resources/decay/treasure2/ruinous_ruleset.json create mode 100644 Treasure2-1.12.2/src/resources/meta/treasure2/structures/test-tower.json create mode 100644 Treasure2-1.12.2/src/resources/structures/treasure2/surface/test-small.nbt create mode 100644 Treasure2-1.12.2/src/resources/structures/treasure2/surface/test-tower.nbt diff --git a/Treasure2-1.12.2/build.gradle b/Treasure2-1.12.2/build.gradle index ec01b0c52..bc64115b5 100644 --- a/Treasure2-1.12.2/build.gradle +++ b/Treasure2-1.12.2/build.gradle @@ -12,6 +12,8 @@ buildscript { plugins { id 'io.franzbecker.gradle-lombok' version '3.1.0' + // must use gradle v3.0+ for this version of shadow (2.0.1). Update gradle-wrapper.properties + id "com.github.johnrengelman.shadow" version "2.0.1" } apply plugin: 'net.minecraftforge.gradle.forge' @@ -57,7 +59,9 @@ sourceSets.main{ def gottschcore_path="../../gottsch-minecraft-GottschCore/GottschCore${mc_version}/build/libs/GottschCore-mc${mc_version}-f${forge_version}-v${gottschcore_version}.jar" dependencies { - compile files(gottschcore_path) +compile files('../../ModCommonLibs/libs/commons-cli-1.4.jar') + //compile files(gottschcore_path) + shadow files(gottschcore_path) } processResources @@ -72,12 +76,24 @@ processResources // replace version and mcversion expand 'version':project.version, 'mcversion':project.minecraft.version - } - + } +} + +shadowJar { + // move everything under "io.github" (which in the DelaunayTriangulator lib) to "com.someguyssoftware.dungeons2.triangulation" + relocate "org.apache.commons.cli", "com.someguyssoftware.treasure2.cli" + // Replace the default JAR + classifier '' } + +reobf { + // Reobfuscate the shadowed JAR + shadowJar {} +} + task deleteOldJar(type: Delete) { delete fileTree("${dest_folder}") { - include "**/${mod_name}-mc${mc_version}-f${forge_version}.*" + include "**/${mod_name}-*.*" } } task copyJar(type: Copy) { diff --git a/Treasure2-1.12.2/gradle/wrapper/gradle-wrapper.properties b/Treasure2-1.12.2/gradle/wrapper/gradle-wrapper.properties index e18cba72f..5633f0c5e 100644 --- a/Treasure2-1.12.2/gradle/wrapper/gradle-wrapper.properties +++ b/Treasure2-1.12.2/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java index 9f4268131..8b89356ee 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java @@ -25,6 +25,7 @@ import com.someguyssoftware.treasure2.command.SpawnPitCommand; import com.someguyssoftware.treasure2.command.SpawnPitOnlyCommand; import com.someguyssoftware.treasure2.command.SpawnPitStructureOnlyCommand; +import com.someguyssoftware.treasure2.command.SpawnRuinsCommand; import com.someguyssoftware.treasure2.command.SpawnWellStructureCommand; import com.someguyssoftware.treasure2.command.SpawnWitherTreeCommand; import com.someguyssoftware.treasure2.config.TreasureConfig; @@ -37,6 +38,7 @@ import com.someguyssoftware.treasure2.item.TreasureItems; import com.someguyssoftware.treasure2.loot.TreasureLootTableMaster; import com.someguyssoftware.treasure2.meta.TreasureMetaManager; +import com.someguyssoftware.treasure2.world.gen.structure.TreasureDecayManager; import com.someguyssoftware.treasure2.world.gen.structure.TreasureTemplateManager; import com.someguyssoftware.treasure2.worldgen.GemOreWorldGenerator; import com.someguyssoftware.treasure2.worldgen.ITreasureWorldGenerator; @@ -127,6 +129,8 @@ public ItemStack getTabIconItem() { // meta manager // NOTE can't be final as Treasure.instance is required. public static TreasureMetaManager META_MANAGER; + public static TreasureDecayManager DECAY_MANAGER; + /** * */ @@ -185,6 +189,7 @@ public void serverStarted(FMLServerStartingEvent event) { event.registerServerCommand(new SpawnPitStructureOnlyCommand()); event.registerServerCommand(new SpawnWellStructureCommand()); event.registerServerCommand(new SpawnWitherTreeCommand()); + event.registerServerCommand(new SpawnRuinsCommand()); } /** @@ -219,6 +224,8 @@ public void init(FMLInitializationEvent event) { FMLCommonHandler.instance().getDataFixer()); META_MANAGER = new TreasureMetaManager(Treasure.instance, "meta"); + + DECAY_MANAGER = new TreasureDecayManager(Treasure.instance, "decay"); } /** diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java index 6a0939f61..db48342d2 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java @@ -5,21 +5,24 @@ import java.util.Random; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.CommandLineParser; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Options; + import com.someguyssoftware.gottschcore.positional.Coords; import com.someguyssoftware.gottschcore.positional.ICoords; +import com.someguyssoftware.gottschcore.world.gen.structure.IDecayRuleSet; import com.someguyssoftware.treasure2.Treasure; import com.someguyssoftware.treasure2.config.IChestConfig; import com.someguyssoftware.treasure2.config.TreasureConfig; import com.someguyssoftware.treasure2.enums.Rarity; import com.someguyssoftware.treasure2.enums.WorldGenerators; -import com.someguyssoftware.treasure2.generator.chest.IChestGenerator; import com.someguyssoftware.treasure2.worldgen.SurfaceChestWorldGenerator; import net.minecraft.command.CommandBase; import net.minecraft.command.ICommandSender; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.server.MinecraftServer; -import net.minecraft.util.text.TextComponentString; import net.minecraft.world.World; /** @@ -28,7 +31,9 @@ * */ public class SpawnRuinsCommand extends CommandBase { - + private static final String NAME_ARG = "name"; + private static final String RULESET_ARG = "ruleset"; + @Override public String getName() { return "t2-ruins"; @@ -36,48 +41,65 @@ public String getName() { @Override public String getUsage(ICommandSender var1) { - return "/t2-ruins [name]: spawns a Treasure! ruins at location (x,y,z)"; + return "/t2-ruins [-ruleset ]: spawns a Treasure! ruins at location (x, y, z)"; } @Override public void execute(MinecraftServer server, ICommandSender commandSender, String[] args) { - EntityPlayer player = (EntityPlayer) commandSender.getCommandSenderEntity(); + Treasure.logger.debug("Starting to build Treasure! ruins ..."); + try { - + // extract the coords args int x, y, z = 0; x = Integer.parseInt(args[0]); y = Integer.parseInt(args[1]); z = Integer.parseInt(args[2]); - - String ruinsName = ""; - if (args.length > 3) { - ruinsName = args[3]; + + // set the coords args to blank (so the cli parser doesn't puke on any negative values - thinks they are arguments + args[0] = args[1] = args[2] = ""; + + // create the parser + CommandLineParser parser = new DefaultParser(); + + // create Options object + Options options = new Options(); + options.addOption(NAME_ARG, true, ""); + options.addOption(RULESET_ARG, true, ""); + + // parse the command line arguments + CommandLine line = parser.parse( options, args ); + + String name = line.getOptionValue(NAME_ARG); + String ruleSetName = line.getOptionValue(RULESET_ARG); + + World world = commandSender.getEntityWorld(); + + Random random = new Random(); + ICoords coords = new Coords(x, y, z); + + // get the structure generator + SurfaceChestWorldGenerator worldGen = + (SurfaceChestWorldGenerator) Treasure.WORLD_GENERATORS.get(WorldGenerators.SURFACE_CHEST); + + // get the ruleset to use from the decay manager + IDecayRuleSet ruleSet = null; + if (ruleSetName != null && !ruleSetName.equals("")) { + if (!ruleSetName.contains(".json")) { + ruleSetName += ".json"; + } + // build the key + String key = (Treasure.MODID + ":" + "decay/" + ruleSetName).replace("\\", "/"); + Treasure.logger.debug("ruleset key -> {}", key); + ruleSet = Treasure.DECAY_MANAGER.getRuleSetMap().get(key); + Treasure.logger.debug("ruleset -> {}", ruleSet); + } + Rarity rarity = Rarity.values()[random.nextInt(Rarity.values().length)]; + IChestConfig config = TreasureConfig.CHESTS.surfaceChests.configMap.get(rarity); + // generate + worldGen.generateSurfaceRuins(world, random,coords, ruleSet, config); } - -// if (ruinsName.equals("")) ruinsName = Rarity.COMMON.name(); -// Rarity rarity = Rarity.valueOf(ruinsName.toUpperCase()); -// Treasure.logger.debug("Rarity:" + rarity + "; " + rarity.ordinal()); - - if (player != null) { - World world = commandSender.getEntityWorld(); - Treasure.logger.debug("Starting to build Treasure! ruins ..."); - - Random random = new Random(); - ICoords coords = new Coords(x, y, z); - - // TODO get the structure generator - - // TODO create a DecayProcessor - - // TODO pass the decay processor to the structure generator - - // TODO either get name of ruins or randomize selection of surface structures - } - } catch(Exception e) { - player.sendMessage(new TextComponentString("Error: " + e.getMessage())); - Treasure.logger.error("Error generating Treasure! chest:", e); - e.printStackTrace(); + Treasure.logger.error("Error generating Treasure! ruins:", e); } } } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/eventhandler/WorldEventHandler.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/eventhandler/WorldEventHandler.java index b3485919f..d5e411e95 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/eventhandler/WorldEventHandler.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/eventhandler/WorldEventHandler.java @@ -64,6 +64,7 @@ public void onWorldLoad(WorldEvent.Load event) { } Treasure.META_MANAGER.register(getMod().getId()); Treasure.TEMPLATE_MANAGER.register(getMod().getId()); + Treasure.DECAY_MANAGER.register(getMod().getId()); /* * clear the current World Gens values and reload diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/IRuinGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/IRuinGenerator.java index 3f8506747..7c97ed01c 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/IRuinGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/IRuinGenerator.java @@ -8,11 +8,24 @@ import com.someguyssoftware.gottschcore.measurement.Quantity; import com.someguyssoftware.gottschcore.positional.ICoords; +import com.someguyssoftware.gottschcore.world.gen.structure.IDecayProcessor; +import com.someguyssoftware.gottschcore.world.gen.structure.IDecayRuleSet; import com.someguyssoftware.treasure2.generator.IGeneratorResult; import com.someguyssoftware.treasure2.generator.TemplateGeneratorData; +import com.someguyssoftware.treasure2.meta.StructureArchetype; +import com.someguyssoftware.treasure2.meta.StructureType; +import com.someguyssoftware.treasure2.tileentity.ProximitySpawnerTileEntity; +import com.someguyssoftware.treasure2.world.gen.structure.TemplateHolder; +import com.someguyssoftware.treasure2.Treasure; +import com.someguyssoftware.treasure2.block.TreasureBlocks; import com.someguyssoftware.treasure2.generator.GeneratorResult; +import net.minecraft.init.Blocks; +import net.minecraft.tileentity.TileEntityMobSpawner; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; +import net.minecraft.world.biome.Biome; +import net.minecraftforge.common.DungeonHooks; /** * @author Mark Gottschling on Aug 23, 2019 @@ -21,10 +34,40 @@ public interface IRuinGenerator> { GeneratorResult generate(World world, Random random, ICoords spawnCoords); + GeneratorResult generate(World world, Random random, ICoords originalSpawnCoords, + IDecayRuleSet decayRuleSet); + +// void buildOneTimeSpawners(World world, Random random, ICoords spawnCoords, List proximityCoords, +// Quantity quantity, double d); +// +// void buildVanillaSpawners(World world, Random random, ICoords spawnCoords, List spawnerCoords); - void buildOneTimeSpawners(World world, Random random, ICoords spawnCoords, List proximityCoords, - Quantity quantity, double d); - - void buildVanillaSpawners(World world, Random random, ICoords spawnCoords, List spawnerCoords); + default public TemplateHolder selectTemplate(World world, Random random, ICoords coords, StructureArchetype archetype, StructureType type) { + // get the biome ID + Biome biome = world.getBiome(coords.toPos()); + TemplateHolder holder = Treasure.TEMPLATE_MANAGER.getTemplate(world, random, archetype, type, biome); + return holder; + } + + default public void buildOneTimeSpawners(World world, Random random, ICoords spawnCoords, List proximityCoords, Quantity quantity, double d) { + for (ICoords c : proximityCoords) { + ICoords c2 = spawnCoords.add(c); + world.setBlockState(c2.toPos(), TreasureBlocks.PROXIMITY_SPAWNER.getDefaultState()); + ProximitySpawnerTileEntity te = (ProximitySpawnerTileEntity) world.getTileEntity(c2.toPos()); + ResourceLocation r = DungeonHooks.getRandomDungeonMob(random); + te.setMobName(r); + te.setMobNum(new Quantity(1, 2)); + te.setProximity(5D); + } + } + default public void buildVanillaSpawners(World world, Random random, ICoords spawnCoords, List spawnerCoords) { + for (ICoords c : spawnerCoords) { + ICoords c2 = spawnCoords.add(c); + world.setBlockState(c2.toPos(), Blocks.MOB_SPAWNER.getDefaultState()); + TileEntityMobSpawner te = (TileEntityMobSpawner) world.getTileEntity(c2.toPos()); + ResourceLocation r = DungeonHooks.getRandomDungeonMob(random); + te.getSpawnerBaseLogic().setEntityId(r); + } + } } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java index 2843a0550..51d9cabf7 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java @@ -10,6 +10,7 @@ import com.someguyssoftware.gottschcore.positional.Coords; import com.someguyssoftware.gottschcore.positional.ICoords; import com.someguyssoftware.gottschcore.world.WorldInfo; +import com.someguyssoftware.gottschcore.world.gen.structure.IDecayRuleSet; import com.someguyssoftware.gottschcore.world.gen.structure.StructureMarkers; import com.someguyssoftware.treasure2.Treasure; import com.someguyssoftware.treasure2.block.TreasureBlocks; @@ -43,10 +44,15 @@ public class SubmergedRuinGenerator implements IRuinGenerator generate(World world, Random random, ICoords originalSpawnCoords) { + return generate(world, random, originalSpawnCoords, null); + } + + @Override + public GeneratorResult generate(World world, Random random, + ICoords originalSpawnCoords, IDecayRuleSet decayRuleSet) { GeneratorResult result = new GeneratorResult<>(TemplateGeneratorData.class); // TODO can abstract to AbstractRuinGenerator which Submerged and Ruin implement. @@ -56,14 +62,15 @@ public GeneratorResult generate(World world, Random rando * Setup */ // get the biome ID - Biome biome = world.getBiome(originalSpawnCoords.toPos()); +// Biome biome = world.getBiome(originalSpawnCoords.toPos()); // create the generator TemplateGenerator generator = new TemplateGenerator(); generator.setNullBlock(Blocks.AIR); // get the template holder from the given archetype, type and biome - TemplateHolder holder = Treasure.TEMPLATE_MANAGER.getTemplate(world, random, StructureArchetype.SUBMERGED, StructureType.RUIN, biome); +// TemplateHolder holder = Treasure.TEMPLATE_MANAGER.getTemplate(world, random, StructureArchetype.SUBMERGED, StructureType.RUIN, biome); + TemplateHolder holder = selectTemplate(world, random, originalSpawnCoords, StructureArchetype.SUBMERGED, StructureType.RUIN); if (holder == null) return result.fail(); // select a random rotation @@ -135,27 +142,27 @@ public GeneratorResult generate(World world, Random rando return result.success(); } - @Override - public void buildOneTimeSpawners(World world, Random random, ICoords spawnCoords, List proximityCoords, Quantity quantity, double d) { - for (ICoords c : proximityCoords) { - ICoords c2 = spawnCoords.add(c); - world.setBlockState(c2.toPos(), TreasureBlocks.PROXIMITY_SPAWNER.getDefaultState()); - ProximitySpawnerTileEntity te = (ProximitySpawnerTileEntity) world.getTileEntity(c2.toPos()); - ResourceLocation r = DungeonHooks.getRandomDungeonMob(random); - te.setMobName(r); - te.setMobNum(new Quantity(1, 2)); - te.setProximity(5D); - } - } - - @Override - public void buildVanillaSpawners(World world, Random random, ICoords spawnCoords, List spawnerCoords) { - for (ICoords c : spawnerCoords) { - ICoords c2 = spawnCoords.add(c); - world.setBlockState(c2.toPos(), Blocks.MOB_SPAWNER.getDefaultState()); - TileEntityMobSpawner te = (TileEntityMobSpawner) world.getTileEntity(c2.toPos()); - ResourceLocation r = DungeonHooks.getRandomDungeonMob(random); - te.getSpawnerBaseLogic().setEntityId(r); - } - } +// @Override +// public void buildOneTimeSpawners(World world, Random random, ICoords spawnCoords, List proximityCoords, Quantity quantity, double d) { +// for (ICoords c : proximityCoords) { +// ICoords c2 = spawnCoords.add(c); +// world.setBlockState(c2.toPos(), TreasureBlocks.PROXIMITY_SPAWNER.getDefaultState()); +// ProximitySpawnerTileEntity te = (ProximitySpawnerTileEntity) world.getTileEntity(c2.toPos()); +// ResourceLocation r = DungeonHooks.getRandomDungeonMob(random); +// te.setMobName(r); +// te.setMobNum(new Quantity(1, 2)); +// te.setProximity(5D); +// } +// } +// +// @Override +// public void buildVanillaSpawners(World world, Random random, ICoords spawnCoords, List spawnerCoords) { +// for (ICoords c : spawnerCoords) { +// ICoords c2 = spawnCoords.add(c); +// world.setBlockState(c2.toPos(), Blocks.MOB_SPAWNER.getDefaultState()); +// TileEntityMobSpawner te = (TileEntityMobSpawner) world.getTileEntity(c2.toPos()); +// ResourceLocation r = DungeonHooks.getRandomDungeonMob(random); +// te.getSpawnerBaseLogic().setEntityId(r); +// } +// } } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java new file mode 100644 index 000000000..36a879e7d --- /dev/null +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java @@ -0,0 +1,179 @@ +/** + * + */ +package com.someguyssoftware.treasure2.generator.ruins; + +import java.util.List; +import java.util.Random; + +import com.someguyssoftware.gottschcore.measurement.Quantity; +import com.someguyssoftware.gottschcore.positional.Coords; +import com.someguyssoftware.gottschcore.positional.ICoords; +import com.someguyssoftware.gottschcore.world.WorldInfo; +import com.someguyssoftware.gottschcore.world.gen.structure.DecayProcessor; +import com.someguyssoftware.gottschcore.world.gen.structure.IDecayProcessor; +import com.someguyssoftware.gottschcore.world.gen.structure.IDecayRuleSet; +import com.someguyssoftware.gottschcore.world.gen.structure.StructureMarkers; +import com.someguyssoftware.treasure2.Treasure; +import com.someguyssoftware.treasure2.block.TreasureBlocks; +import com.someguyssoftware.treasure2.generator.GenUtil; +import com.someguyssoftware.treasure2.generator.GeneratorResult; +import com.someguyssoftware.treasure2.generator.TemplateGeneratorData; +import com.someguyssoftware.treasure2.meta.StructureArchetype; +import com.someguyssoftware.treasure2.meta.StructureMeta; +import com.someguyssoftware.treasure2.meta.StructureType; +import com.someguyssoftware.treasure2.tileentity.ProximitySpawnerTileEntity; +import com.someguyssoftware.treasure2.world.gen.structure.TemplateGenerator; +import com.someguyssoftware.treasure2.world.gen.structure.TemplateHolder; + +import net.minecraft.init.Blocks; +import net.minecraft.tileentity.TileEntityMobSpawner; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.Rotation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.gen.structure.template.PlacementSettings; +import net.minecraftforge.common.DungeonHooks; + +/** + * + * @author Mark Gottschling on Dec 13, 2019 + * + */ +public class SurfaceRuinGenerator implements IRuinGenerator> { + + /** + * + */ + public SurfaceRuinGenerator() {} + + // TODO create a generate() version that takes the template in as a param and the decay processor ... or they are member properties and they method checks them first. + @Override + public GeneratorResult generate(World world, Random random, + ICoords originalSpawnCoords) { + return generate(world, random, originalSpawnCoords, null); + } + + @Override + public GeneratorResult generate(World world, Random random, + ICoords originalSpawnCoords, IDecayRuleSet decayRuleSet) { + GeneratorResult result = new GeneratorResult<>(TemplateGeneratorData.class); + + /* + * Setup + */ + // create the generator + TemplateGenerator generator = new TemplateGenerator(); + + // get the template holder from the given archetype, type and biome + TemplateHolder holder = selectTemplate(world, random, originalSpawnCoords, StructureArchetype.SURFACE, StructureType.RUIN); + if (holder == null) return result.fail(); + + // select a random rotation + Rotation rotation = Rotation.values()[random.nextInt(Rotation.values().length)]; + Treasure.logger.debug("rotation used -> {}", rotation); + + // setup placement + PlacementSettings placement = new PlacementSettings(); + placement.setRotation(rotation).setRandom(random); + + // determine the actual spawn coords + ICoords templateSize = new Coords(holder.getTemplate().transformedSize(placement.getRotation())); + ICoords actualSpawnCoords = generator.getTransformedSpawnCoords(originalSpawnCoords, templateSize, placement); + + Treasure.logger.debug("original coords -> {}",originalSpawnCoords.toShortString()); + Treasure.logger.debug("actual coords -> {}", actualSpawnCoords.toShortString()); + + // NOTE these checks don't really belong in a generator as their task is to just generate. + // however, the template is unknown outside this call and thus the rotate, placement, size and actual coords would be unknown. + /** + * Environment Checks + */ + actualSpawnCoords = WorldInfo.getDryLandSurfaceCoords(world, actualSpawnCoords); + Treasure.logger.debug("surface coords -> {}", actualSpawnCoords.toShortString()); + if (actualSpawnCoords == WorldInfo.EMPTY_COORDS) { + return result.fail(); + } + + // check if it has 30% land + if (!WorldInfo.isSolidBase(world, actualSpawnCoords, templateSize.getX(), templateSize.getZ(), 30)) { + Treasure.logger.debug("Coords [{}] does not meet solid base requires for {} x {}", actualSpawnCoords.toShortString(), templateSize.getX(), templateSize.getZ()); + return result.fail(); + } + + for (int i = 0; i < 3; i++) { + if (!WorldInfo.isSolidBase(world, actualSpawnCoords, templateSize.getX(), templateSize.getZ(), 50)) { + if (i == 3) { + Treasure.logger.debug("Coords -> [{}] does not meet {}% solid base requirements for size -> {} x {}", 50, originalSpawnCoords.toShortString(), templateSize.getX(), templateSize.getY()); + return result.fail(); + } + else { + originalSpawnCoords = originalSpawnCoords.add(0, -1, 0); + } + } + else { + continue; + } + } + + /** + * Build + */ + // update original spawn coords' y-value to be that of actual spawn coords. + // this is the coords that need to be supplied to the template generator to allow + // the structure to generator in the correct place + originalSpawnCoords = new Coords(originalSpawnCoords.getX(), actualSpawnCoords.getY(), originalSpawnCoords.getZ()); + + Treasure.logger.debug("holder.location -> {}", holder.getLocation()); + Treasure.logger.debug("holder.meta -> {}", holder.getMetaLocation()); + Treasure.logger.debug("holder.decay -> {}", holder.getDecayRuleSetLocation()); + + // NOTE don't like this here and then AGAIN in TemplateGenerator + // get the rule set from the meta which is in the holder + StructureMeta meta = (StructureMeta) Treasure.META_MANAGER.getMetaMap().get(holder.getMetaLocation().toString()); + if (meta == null) { + Treasure.logger.debug("Unable to locate meta data for template -> {}", holder.getLocation()); + return result.fail(); + } + + // setup the decay ruleset and processor + IDecayProcessor decayProcessor = null; + if (decayRuleSet == null) { + // create a decay processor + decayRuleSet = Treasure.DECAY_MANAGER.getRuleSetMap().get(holder.getDecayRuleSetLocation().toString()); + Treasure.logger.debug("decayRuleSet -> {}", decayRuleSet); + // if decayRuleSet is null the processor should be null + } + if (decayRuleSet != null) { + decayProcessor = new DecayProcessor(Treasure.instance.getInstance(), decayRuleSet); + } + + GeneratorResult genResult = generator.generate(world, random, decayProcessor, holder, placement, originalSpawnCoords); + if (!genResult.isSuccess()) return result.fail(); + + Treasure.logger.debug("surface gen result -> {}", genResult); + // get the chest coords + ICoords chestCoords = genResult.getData().getChestCoords(); + if (chestCoords != null) { + // move the chest coords to the first dry land beneath it. + chestCoords = WorldInfo.getDryLandSurfaceCoords(world, chestCoords); + if (chestCoords == WorldInfo.EMPTY_COORDS) chestCoords = null; + } + genResult.getData().setChestCoords(chestCoords); + + // interrogate info for spawners and any other special block processing (except chests that are handler by caller + List spawnerCoords = (List) genResult.getData().getMap().get(GenUtil.getMarkerBlock(StructureMarkers.SPAWNER)); + List proximityCoords = (List) genResult.getData().getMap().get(GenUtil.getMarkerBlock(StructureMarkers.PROXIMITY_SPAWNER)); + + // populate vanilla spawners + buildVanillaSpawners(world, random, genResult.getData().getSpawnCoords(), spawnerCoords); + + // populate proximity spawners + buildOneTimeSpawners(world, random, genResult.getData().getSpawnCoords(), proximityCoords, new Quantity(1,2), 5D); + + result.setData(genResult.getData()); + + return result.success(); + } +} diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/meta/StructureMeta.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/meta/StructureMeta.java index 6254872f7..32934f22f 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/meta/StructureMeta.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/meta/StructureMeta.java @@ -13,6 +13,7 @@ public class StructureMeta extends Meta { private int verticalOffset; private boolean includeGraves; private boolean includeFog; + private String decayRuleSetName; public StructureMeta() {} @@ -35,7 +36,12 @@ public void setIncludeFog(boolean includeFog) { @Override public String toString() { return "StructureMeta [verticalOffset=" + verticalOffset + ", includeGraves=" + includeGraves + ", includeFog=" - + includeFog + ", toString()=" + super.toString() + "]"; + + includeFog + ", decayRuleSetName=" + decayRuleSetName + ", getName()=" + getName() + + ", getDescription()=" + getDescription() + ", getAuthor()=" + getAuthor() + ", getParent()=" + + getParent() + ", getArchetypes()=" + getArchetypes() + ", getType()=" + getType() + ", getThemes()=" + + getThemes() + ", getBiomeWhiteList()=" + getBiomeWhiteList() + ", getBiomeBlackList()=" + + getBiomeBlackList() + ", getRarities()=" + getRarities() + ", getOrder()=" + getOrder() + + ", getOffset()=" + getOffset() + "]"; } public int getVerticalOffset() { @@ -45,5 +51,13 @@ public int getVerticalOffset() { public void setVerticalOffset(int verticalOffset) { this.verticalOffset = verticalOffset; } + + public String getDecayRuleSetName() { + return decayRuleSetName; + } + + public void setDecayRuleSetName(String decayRuleSetName) { + this.decayRuleSetName = decayRuleSetName; + } } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/ITemplateGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/ITemplateGenerator.java index c3fd33a22..8716cda78 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/ITemplateGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/ITemplateGenerator.java @@ -3,7 +3,10 @@ import java.util.Random; import com.someguyssoftware.gottschcore.positional.ICoords; +import com.someguyssoftware.gottschcore.world.gen.structure.IDecayProcessor; +import com.someguyssoftware.treasure2.generator.GeneratorResult; import com.someguyssoftware.treasure2.generator.IGeneratorResult; +import com.someguyssoftware.treasure2.generator.TemplateGeneratorData; import net.minecraft.block.Block; import net.minecraft.util.math.BlockPos; @@ -19,6 +22,9 @@ public interface ITemplateGenerator> { public RESULT generate(World world, Random random, TemplateHolder templateHolder, PlacementSettings settings, ICoords spawnCoords); + public RESULT generate(World world, Random random, IDecayProcessor decayProcessor, + TemplateHolder templateHolder, PlacementSettings placement, ICoords coords); + /** * NOTE not 100% sure that this belongs here * @param coords @@ -52,7 +58,8 @@ public static ICoords alignEntranceToCoords(ICoords coords, ICoords entranceCoor } public Block getNullBlock(); - public void setNullBlock(Block nullBlock); + + } \ No newline at end of file diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java index 3f20180f4..ffaaca22b 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java @@ -9,7 +9,9 @@ import com.someguyssoftware.gottschcore.positional.Coords; import com.someguyssoftware.gottschcore.positional.ICoords; +import com.someguyssoftware.gottschcore.world.gen.structure.DecayProcessor; import com.someguyssoftware.gottschcore.world.gen.structure.GottschTemplate; +import com.someguyssoftware.gottschcore.world.gen.structure.IDecayProcessor; import com.someguyssoftware.gottschcore.world.gen.structure.StructureMarkers; import com.someguyssoftware.treasure2.Treasure; import com.someguyssoftware.treasure2.generator.GenUtil; @@ -48,17 +50,23 @@ public TemplateGenerator() { setNullBlock(GenUtil.getMarkerBlock(StructureMarkers.NULL)); } + @Override + public GeneratorResult generate(World world, Random random, + TemplateHolder templateHolder, PlacementSettings placement, ICoords coords) { + return generate(world, random, null, templateHolder, placement, coords); + } + /** * */ @Override public GeneratorResult generate(World world, Random random, - TemplateHolder templateHolder, PlacementSettings placement, ICoords coords) { + IDecayProcessor decayProcessor, TemplateHolder templateHolder, PlacementSettings placement, ICoords coords) { GeneratorResult result = new GeneratorResult<>(TemplateGeneratorData.class); GottschTemplate template = (GottschTemplate) templateHolder.getTemplate(); - + Treasure.logger.debug("template size -> {}", template.getSize()); // get the meta StructureMeta meta = (StructureMeta) Treasure.META_MANAGER.getMetaMap().get(templateHolder.getMetaLocation().toString()); if (meta == null) { @@ -86,9 +94,14 @@ public GeneratorResult generate(World world, Random rando // update the spawn coords with the offset ICoords spawnCoords = coords.add(0, offset, 0); - // TODO provide decayProcessor // generate the structure - template.addBlocksToWorld(world, spawnCoords.toPos(), placement, getNullBlock(), Treasure.TEMPLATE_MANAGER.getReplacementMap(), 3); + if (decayProcessor == null) { + Treasure.logger.debug("no decay processor found."); + template.addBlocksToWorld(world, spawnCoords.toPos(), placement, getNullBlock(), Treasure.TEMPLATE_MANAGER.getReplacementMap(), 3); + } + else { + template.addBlocksToWorld(world, spawnCoords.toPos(), decayProcessor, placement, getNullBlock(), Treasure.TEMPLATE_MANAGER.getReplacementMap(), 3); + } Treasure.logger.debug("added blocks to the world."); diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateHolder.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateHolder.java index 554021ddd..d8c4a61c4 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateHolder.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateHolder.java @@ -14,9 +14,17 @@ public class TemplateHolder { private Template template; private ResourceLocation location; private ResourceLocation metaLocation; + private ResourceLocation decayRuleSetLocation; public TemplateHolder() {} + public TemplateHolder(Template template, ResourceLocation location, ResourceLocation metaLocation, ResourceLocation ruleSetLocation) { + setTemplate(template); + setLocation(metaLocation); + setMetaLocation(metaLocation); + setDecayRuleSetLocation(ruleSetLocation); + } + public TemplateHolder(Template template, ResourceLocation location, ResourceLocation metaLocation) { setTemplate(template); setLocation(metaLocation); @@ -54,4 +62,19 @@ public TemplateHolder setMetaLocation(ResourceLocation metaLocation) { this.metaLocation = metaLocation; return this; } + + public ResourceLocation getDecayRuleSetLocation() { + return decayRuleSetLocation; + } + + public TemplateHolder setDecayRuleSetLocation(ResourceLocation decayRuleSetLocation) { + this.decayRuleSetLocation = decayRuleSetLocation; + return this; + } + + @Override + public String toString() { + return "TemplateHolder [location=" + location.toString() + ", metaLocation=" + metaLocation.toString() + + ", decayRuleSetLocation=" + decayRuleSetLocation.toString() + "]"; + } } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TreasureDecayManager.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TreasureDecayManager.java new file mode 100644 index 000000000..a75386d59 --- /dev/null +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TreasureDecayManager.java @@ -0,0 +1,72 @@ +/** + * + */ +package com.someguyssoftware.treasure2.world.gen.structure; + +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; + +import com.google.common.collect.ImmutableList; +import com.someguyssoftware.gottschcore.mod.IMod; +import com.someguyssoftware.gottschcore.world.gen.structure.DecayManager; +import com.someguyssoftware.gottschcore.world.gen.structure.IDecayRuleSet; +import com.someguyssoftware.treasure2.Treasure; + +import net.minecraft.util.ResourceLocation; + +/** + * + * @author Mark Gottschling on Dec 20, 2019 + * + */ +public class TreasureDecayManager extends DecayManager { + // set to empty/blank list as there is only one location. current design of methods must take in a location or list of locations. + private static List FOLDER_LOCATIONS = ImmutableList.of(""); + + public TreasureDecayManager(IMod mod, String resourceFolder) { + super(mod, resourceFolder); + + // build and expose template/structure folders + buildAndExpose(getBaseResourceFolder(), Treasure.MODID, FOLDER_LOCATIONS); + } + + /** + * + */ + public void clear() { + super.clear(); + } + + /** + * Call in WorldEvent.Load() event handler. Loads and registers ruleset files from + * the file system. + * + * @param modID + */ + public void register(String modID) { + // set location to empty because there is only one location where decay files are. + String location = ""; + Treasure.logger.debug("registering ruleset files from location -> {}", location); + // get loot table files as ResourceLocations from the file system location + List locs = getResourceLocations(modID, location); + + // load each ResourceLocation as DecayRuleSet and map it. + for (ResourceLocation loc : locs) { + Path path = Paths.get(loc.getResourcePath()); + if (Treasure.logger.isDebugEnabled()) { + Treasure.logger.debug("path to ruleset resource loc -> {}", path.toString()); + } + + // load ruleset + Treasure.logger.debug("attempted to load custom ruleset file with key -> {}", loc.toString()); + IDecayRuleSet ruleset = load(loc); + // add the id to the map + if (ruleset == null) { + Treasure.logger.debug("Unable to locate ruleset file -> {}", loc.toString()); + continue; + } + Treasure.logger.debug("loaded custom ruleset file with key -> {}", loc.toString()); + } + } +} diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TreasureTemplateManager.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TreasureTemplateManager.java index aabfec4d9..68d3356f0 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TreasureTemplateManager.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TreasureTemplateManager.java @@ -60,6 +60,8 @@ */ public class TreasureTemplateManager extends GottschTemplateManager { + // TODO add templates by name + private final Table> templatesByArchetypeType = HashBasedTable.create(); private final Table> templatesByArchetypeTypeBiome = HashBasedTable.create(); @@ -131,7 +133,7 @@ public void register(String modID) { String key = metaResourceLocation.toString(); Treasure.logger.debug("Using key to find meta -> {}", key); - // look for IMeta in MetaManager by treasure2:structures/treasure2/surface/x.nbt + // look for IMeta in DecayManager by treasure2:structures/treasure2/surface/x.nbt StructureMeta meta = (StructureMeta) Treasure.META_MANAGER.getMetaMap().get(key); if (meta == null) { // there isn't a meta found for resource, skip to next template @@ -161,21 +163,37 @@ public void register(String modID) { // TODO future state: first determine if parent/child - if child, need to find the parent template holder in map - how? // probably needs to be mapped by meta, then it can be mapped otherwise + // determine if the meta decayRuleSetName is populated + ResourceLocation decayRuleSetResourceLocation = null; + if (meta.getDecayRuleSetName() != null && !meta.getDecayRuleSetName().equals("")) { + // build the key for the meta manager to look at + decayRuleSetResourceLocation = new ResourceLocation( + getMod().getId() + ":" + Treasure.DECAY_MANAGER.getBaseResourceFolder()+ "/" + modID + "/" + meta.getDecayRuleSetName() + ".json"); + String decayKey = decayRuleSetResourceLocation.toString(); + Treasure.logger.debug("Using key to find decay ruleset -> {}", decayKey); + } + // map according to meta archetype, type for (IMetaArchetype archetype : meta.getArchetypes()) { TemplateHolder holder = new TemplateHolder() .setMetaLocation(metaResourceLocation) .setLocation(loc) - .setTemplate(template); - Treasure.logger.debug("Using meta to map archetype type -> {}", meta.toString()); + .setDecayRuleSetLocation(decayRuleSetResourceLocation) + .setTemplate(template); + Treasure.logger.debug("Using meta to map archetype type -> {}", meta.toString()); if (!templatesByArchetypeType.contains(archetype, meta.getType())) { templatesByArchetypeType.put(archetype, meta.getType(), new ArrayList<>(3)); } this.templatesByArchetypeType.get(archetype, meta.getType()).add(holder); + + Treasure.logger.debug("Registered holder -> location -> {}, meta -> {}, decay -> {}", + holder.getLocation(), + holder.getMetaLocation(), + holder.getDecayRuleSetLocation()); // TODO could move the wrapping for into this method instead, then could lose the archetype that is passed in. ***!!! - mapToTemplatesByArchetypeBiome(metaResourceLocation, loc, archetype, meta.getType(), template); + mapToTemplatesByArchetypeBiome(metaResourceLocation, loc, decayRuleSetResourceLocation, archetype, meta.getType(), template); } } } @@ -192,16 +210,19 @@ public void register(String modID) { * @param template */ private void mapToTemplatesByArchetypeBiome(ResourceLocation metaResourceLocation, - ResourceLocation location, IMetaArchetype archetype, IMetaType type, Template template) { + ResourceLocation location, ResourceLocation decayResourceLocation, IMetaArchetype archetype, IMetaType type, + Template template) { // build mapping key String key = archetype.getName() + ":" + type.getName(); // find the meta for the template StructureMeta meta = (StructureMeta) Treasure.META_MANAGER.getMetaMap().get(metaResourceLocation.toString()); + // create a holder for the template TemplateHolder holder = new TemplateHolder() .setMetaLocation(metaResourceLocation) + .setDecayRuleSetLocation(decayResourceLocation) .setLocation(location) .setTemplate(template); diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SurfaceChestWorldGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SurfaceChestWorldGenerator.java index bd2f5c6e2..3ccad95f3 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SurfaceChestWorldGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SurfaceChestWorldGenerator.java @@ -24,6 +24,8 @@ import com.someguyssoftware.gottschcore.random.RandomHelper; import com.someguyssoftware.gottschcore.random.RandomWeightedCollection; import com.someguyssoftware.gottschcore.world.WorldInfo; +import com.someguyssoftware.gottschcore.world.gen.structure.IDecayProcessor; +import com.someguyssoftware.gottschcore.world.gen.structure.IDecayRuleSet; import com.someguyssoftware.treasure2.Treasure; import com.someguyssoftware.treasure2.biome.TreasureBiomeHelper; import com.someguyssoftware.treasure2.biome.TreasureBiomeHelper.Result; @@ -36,6 +38,7 @@ import com.someguyssoftware.treasure2.generator.ChestGeneratorData; import com.someguyssoftware.treasure2.generator.GeneratorData; import com.someguyssoftware.treasure2.generator.GeneratorResult; +import com.someguyssoftware.treasure2.generator.TemplateGeneratorData; import com.someguyssoftware.treasure2.generator.chest.CauldronChestGenerator; import com.someguyssoftware.treasure2.generator.chest.CommonChestGenerator; import com.someguyssoftware.treasure2.generator.chest.EpicChestGenerator; @@ -54,6 +57,7 @@ import com.someguyssoftware.treasure2.generator.pit.SimplePitGenerator; import com.someguyssoftware.treasure2.generator.pit.StructurePitGenerator; import com.someguyssoftware.treasure2.generator.pit.TntTrapPitGenerator; +import com.someguyssoftware.treasure2.generator.ruins.SurfaceRuinGenerator; import com.someguyssoftware.treasure2.persistence.GenDataPersistence; import com.someguyssoftware.treasure2.registry.ChestRegistry; @@ -292,12 +296,12 @@ else if (biomeCheck == Result.OK) { * @param random * @param coords * @param chestRarity - * @param chestSelector + * @param chestGenerator * @param config * @return */ private GeneratorResult generate(World world, Random random, ICoords coords, Rarity chestRarity, - IChestGenerator chestSelector, IChestConfig config) { + IChestGenerator chestGenerator, IChestConfig config) { ICoords chestCoords = null; ICoords markerCoords = null; @@ -322,18 +326,22 @@ private GeneratorResult generate(World world, Random random, ICoo if (config.isSurfaceAllowed() && RandomHelper.checkProbability(random, TreasureConfig.CHESTS.surfaceChests.surfaceChestProbability)) { if (RandomHelper.checkProbability(random, TreasureConfig.WORLD_GEN.getGeneralProperties().surfaceStructureProbability)) { - // TEMP - until surface buildings are added - // TODO add surface templates // no markers -// hasMarkers = false; + hasMarkers = false; + + genResult = generateSurfaceRuins(world, random, surfaceCoords, config); + Treasure.logger.debug("surface result -> {}", genResult.toString()); + if (!genResult.isSuccess()) { + return result.fail(); + } // set the chest coords to the surface pos - chestCoords = new Coords(markerCoords); - Treasure.logger.debug("Above ground structure @ {}", chestCoords.toShortString()); + chestCoords = genResult.getData().getChestCoords(); + Treasure.logger.debug("Above ground structure coords -> {}", chestCoords.toShortString()); } else { // set the chest coords to the surface pos chestCoords = new Coords(markerCoords); - Treasure.logger.debug("Above ground, chest only @ {}", chestCoords.toShortString()); + Treasure.logger.debug("Above ground, chest only coords -> {}", chestCoords.toShortString()); } } else if (config.isSubterraneanAllowed()) { @@ -354,9 +362,9 @@ else if (config.isSubterraneanAllowed()) { // add markers (above chest or shaft) if (hasMarkers) { - chestSelector.addMarkers(world, random, markerCoords); + chestGenerator.addMarkers(world, random, markerCoords); } - GeneratorResult chestResult = chestSelector.generate(world, random, chestCoords, chestRarity, genResult.getData().getChestState()); + GeneratorResult chestResult = chestGenerator.generate(world, random, chestCoords, chestRarity, genResult.getData().getChestState()); if (!chestResult.isSuccess()) { return result.fail(); } @@ -366,6 +374,45 @@ else if (config.isSubterraneanAllowed()) { return result.success(); } + /** + * + * @param world + * @param random + * @param spawnCoords + * @param config + * @return + */ + public GeneratorResult generateSurfaceRuins(World world, Random random, ICoords spawnCoords, + IChestConfig config) { + return generateSurfaceRuins(world, random, spawnCoords, null, config); + } + + /** + * + * @param world + * @param random + * @param spawnCoords + * @param decayProcessor + * @param config + * @return + */ + public GeneratorResult generateSurfaceRuins(World world, Random random, ICoords spawnCoords, + IDecayRuleSet decayRuleSet, IChestConfig config) { + + GeneratorResult result = new GeneratorResult<>(ChestGeneratorData.class); + result.getData().setSpawnCoords(spawnCoords); + + SurfaceRuinGenerator generator = new SurfaceRuinGenerator(); + + // build the structure + GeneratorResult genResult = generator.generate(world, random, spawnCoords, decayRuleSet); + Treasure.logger.debug("surface struct result -> {}", genResult); + if (!genResult.isSuccess()) return result.fail(); + + result.setData(genResult.getData()); + return result.success(); + } + /** * Land Only * @param world @@ -467,6 +514,7 @@ private void generateNether(World world, Random random, int i, int j) {} @SuppressWarnings("unused") private void generateEnd(World world, Random random, int i, int j) {} + // TODO move to interface or abstract /** * * @param world diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/WitherTreeWorldGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/WitherTreeWorldGenerator.java index f01050068..9462aebce 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/WitherTreeWorldGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/WitherTreeWorldGenerator.java @@ -314,6 +314,9 @@ public GeneratorResult generate(World world, Random random, ICoor return result.fail(); } ICoords chestCoords = genResult.getData().getChestCoords(); + if (chestCoords == null) { + return result.fail(); + } // add chest // WitherChestGenerator chestGen = new WitherChestGenerator(); @@ -605,11 +608,9 @@ public boolean isRegisteredChestWithinDistance(World world, ICoords coords, int return false; } - Treasure.logger.debug("Min distance Sq -> {}", minDistanceSq); for (ChestInfo info : infos) { // calculate the distance to the poi double distance = coords.getDistanceSq(info.getCoords()); - Treasure.logger.debug("ChestConfig dist^2: " + distance); if (distance < minDistanceSq) { return true; } diff --git a/Treasure2-1.12.2/src/resources/decay/default_ruleset.json b/Treasure2-1.12.2/src/resources/decay/default_ruleset.json deleted file mode 100644 index 132a28a90..000000000 --- a/Treasure2-1.12.2/src/resources/decay/default_ruleset.json +++ /dev/null @@ -1,20 +0,0 @@ - { - "verticalDecayRate": 1.0, - "initialBlockStrength": 100.0, - "blockStrengthThreshold": 0.0, - "blockStrengthDecayRate": 10.0, - "blockStrengthDistanceDecayRate": 25.0, - "decayRules": { - "minecraft:stonebrick@0": { - "block": "minecraft:stonebrick@0", - "decayIterations": 3, - "decayProbability": 15.0, - "decayBlocks": [ - "minecraft:stonebrick@1", - "minecraft:stonebrick@2", - "minecraft:cobblestone@0", - "minecraft:gravel@0" - ] - } - } -} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/decay/treasure2/default_ruleset.json b/Treasure2-1.12.2/src/resources/decay/treasure2/default_ruleset.json new file mode 100644 index 000000000..a754f524f --- /dev/null +++ b/Treasure2-1.12.2/src/resources/decay/treasure2/default_ruleset.json @@ -0,0 +1,54 @@ + { + "verticalDecayRate": { + "min": 5.0, + "max": 10.0 + }, + "initialBlockStrength": 100.0, + "blockStrengthThreshold": 0.0, + "blockStrengthDecayRate": { + "min": 12.5, + "max": 20.0 + }, + "blockStrengthDistanceDecayRate": { + "min": 22.0, + "max": 30.0 + }, + "decayRules": { + "minecraft:stonebrick": { + "block": "minecraft:stonebrick", + "decayIterations": 5, + "decayProbability": 20.0, + "decayBlocks": [ + "minecraft:stonebrick@1", + "minecraft:stonebrick@2", + "minecraft:cobblestone@0", + "minecraft:gravel@0", + "minecraft:air@0" + ] + }, + "minecraft:stone_brick_stairs": { + "block": "minecraft:stone_brick_stairs", + "decayIterations": 2, + "decayProbability": 15.0, + "decayBlocks": [ + "minecraft:stone_stairs@0", + "minecraft:air@0" + ] + }, + "minecraft:log": { + "block": "minecraft:log", + "decayIterations": 1, + "decayProbability": 15.0, + "decayBlocks": [ + "minecraft:air@0" + ] + }, + "default": { + "decayIterations": 1, + "decayProbability": 15.0, + "decayBlocks": [ + "minecraft:air@0" + ] + } + } +} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/decay/treasure2/ruinous_ruleset.json b/Treasure2-1.12.2/src/resources/decay/treasure2/ruinous_ruleset.json new file mode 100644 index 000000000..255cba61e --- /dev/null +++ b/Treasure2-1.12.2/src/resources/decay/treasure2/ruinous_ruleset.json @@ -0,0 +1,47 @@ + { + "verticalDecayRate": { + "min": 12.0, + "max": 17.0 + }, + "initialBlockStrength": 100.0, + "blockStrengthThreshold": 0.0, + "blockStrengthDecayRate": { + "min": 22.5, + "max": 29.0 + }, + "blockStrengthDistanceDecayRate": { + "min": 25.0, + "max": 37.0 + }, + "decayRules": { + "minecraft:stonebrick": { + "block": "minecraft:stonebrick", + "decayIterations": 6, + "decayProbability": 30.0, + "decayBlocks": [ + "minecraft:stonebrick@1", + "minecraft:stonebrick@2", + "minecraft:cobblestone@0", + "minecraft:gravel@0", + "minecraft:air@0" + ] + }, + "minecraft:stone_brick_stairs": { + "block": "minecraft:stone_brick_stairs", + "decayIterations": 3, + "decayProbability": 25.0, + "decayBlocks": [ + "minecraft:stone_stairs@0", + "minecraft:air@0" + ] + }, + "minecraft:log": { + "block": "minecraft:log", + "decayIterations": 2, + "decayProbability": 25.0, + "decayBlocks": [ + "minecraft:air@0" + ] + } + } +} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/test-tower.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/test-tower.json new file mode 100644 index 000000000..2c0e6db46 --- /dev/null +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/test-tower.json @@ -0,0 +1,17 @@ +{ + "name": "Test", + "description": "", + "author": "gottsch", + "archetypes": ["surface"], + "type": "ruin", + "themes": ["dungeon"], + "rarities": ["common"], + "biomeWhiteList": [], + "biomeBlackList": [], + "offset": { + "x": 0, + "y": -1, + "z": 0 + }, + "decayRuleSetName": "default_ruleset" +} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/structures/treasure2/surface/test-small.nbt b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/test-small.nbt new file mode 100644 index 0000000000000000000000000000000000000000..a8819684c61b8c9628b56a537e8d58d2ba3a3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98Sq9G-vZ>*8 z?|A2$aj61&kounj{h1uleeq8Y%#^ONZ99f*=&{M(1^TWVRD>ReIqM1j0k{jfeJ%Ou zJI%1(m_v0`?`|iV97fV#XvAR~iq}d7f~$Ais8licIp>^F?PM#mdph3Rl2E6X51Etd z{3-UrVO@0MFI72Kicpz|tjYHW(Db{2mC#s$s$I-4P4bweuJX5sKz#57TS8>5k0Jre zZA-3*Erp=?gPB4M5FwZ^ZeBf=Eca>mHGKk%2`bWu(pdzEJ-eYtpa&fB_#g{*)AK(D!cN zj?V*h;2|+mYiSG|jP!~C&|*&2h5c?jW5~4|Q%}R0;SXPfedXCxnd;tb5vFDb_I-DS zc6`mRGQ%(HhQ5w&fW^rv*kzSi0 zHsSm0K(pZ{Yi=BX^pxd%>#uv`(fAcJO6d}D{fT;_VNtMag6i&AX2W6KoAX3ql-uaOt zU>D%`96^05iL6`4$cOeK?BPA26Tp?Z?@khWj%6 zy0zlCyH*8g{@E%y9}S6--{~8ckA}gi$ypd8>;ETNT}~ZNP8NmRxVQ*}LcG`$$rFddmVoQx`qX)a#sS~93T*5`YAYz(th^j+;(g5zS* z^d$pU;esP`L9jfxLqd7Rf?pSj8sYX`DybruB86LNl5Sl|{2kR`KBwpiJ$Y#kel{&K z>*HIGzZD3Ro3z@*kJ%r^|6UPYl?**zj Date: Sun, 29 Dec 2019 22:01:03 -0500 Subject: [PATCH 07/23] structures add. decay fixes. --- .../treasure2/command/SpawnRuinsCommand.java | 2 +- .../generator/pit/StructurePitGenerator.java | 12 +- .../generator/ruins/IRuinGenerator.java | 21 +-- .../ruins/SubmergedRuinGenerator.java | 57 +++--- .../generator/ruins/SurfaceRuinGenerator.java | 8 +- .../gen/structure/TemplateGenerator.java | 7 +- .../worldgen/SurfaceChestWorldGenerator.java | 2 - .../treasure2/blockstates/clam_chest.json | 11 -- .../treasure2/models/item/clam_chest.json | 10 -- .../treasure2/models/item/clam_meat.json | 21 --- .../treasure2/models/item/clam_stew.json | 21 --- .../treasure2/models/item/oyster_chest.json | 10 -- .../treasure2/models/item/oyster_meat.json | 21 --- .../treasure2/models/item/oyster_stew.json | 21 --- .../decay/treasure2/default_ruleset.json | 162 ++++++++++++------ .../decay/treasure2/ruinous_ruleset.json | 91 ++++++++-- .../treasure2/chests/special/clam_chest.json | 46 ----- .../chests/special/oyster_chest.json | 46 ----- .../meta/treasure2/structures/church1.json | 17 ++ .../treasure2/structures/desert-tower2.json | 12 ++ .../meta/treasure2/structures/ship1.json | 3 +- .../meta/treasure2/structures/ship2.json | 3 +- .../meta/treasure2/structures/ship3.json | 3 +- .../meta/treasure2/structures/tower1.json | 12 ++ .../meta/treasure2/structures/tower2.json | 12 ++ .../structures/treasure2/surface/church1.nbt | Bin 0 -> 3632 bytes .../treasure2/surface/desert-tower2.nbt | Bin 0 -> 4086 bytes .../structures/treasure2/surface/tower1.nbt | Bin 0 -> 6095 bytes .../structures/treasure2/surface/tower2.nbt | Bin 0 -> 4196 bytes 29 files changed, 304 insertions(+), 327 deletions(-) delete mode 100644 Treasure2-1.12.2/src/resources/assets/treasure2/blockstates/clam_chest.json delete mode 100644 Treasure2-1.12.2/src/resources/assets/treasure2/models/item/clam_chest.json delete mode 100644 Treasure2-1.12.2/src/resources/assets/treasure2/models/item/clam_meat.json delete mode 100644 Treasure2-1.12.2/src/resources/assets/treasure2/models/item/clam_stew.json delete mode 100644 Treasure2-1.12.2/src/resources/assets/treasure2/models/item/oyster_chest.json delete mode 100644 Treasure2-1.12.2/src/resources/assets/treasure2/models/item/oyster_meat.json delete mode 100644 Treasure2-1.12.2/src/resources/assets/treasure2/models/item/oyster_stew.json delete mode 100644 Treasure2-1.12.2/src/resources/loot_tables/treasure2/chests/special/clam_chest.json delete mode 100644 Treasure2-1.12.2/src/resources/loot_tables/treasure2/chests/special/oyster_chest.json create mode 100644 Treasure2-1.12.2/src/resources/meta/treasure2/structures/church1.json create mode 100644 Treasure2-1.12.2/src/resources/meta/treasure2/structures/desert-tower2.json create mode 100644 Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower1.json create mode 100644 Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower2.json create mode 100644 Treasure2-1.12.2/src/resources/structures/treasure2/surface/church1.nbt create mode 100644 Treasure2-1.12.2/src/resources/structures/treasure2/surface/desert-tower2.nbt create mode 100644 Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower1.nbt create mode 100644 Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower2.nbt diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java index db48342d2..c8d64f108 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java @@ -41,7 +41,7 @@ public String getName() { @Override public String getUsage(ICommandSender var1) { - return "/t2-ruins [-ruleset ]: spawns a Treasure! ruins at location (x, y, z)"; + return "/t2-ruins [-ruleset ]: spawns ruins at location (x, y, z)"; } @Override diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/pit/StructurePitGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/pit/StructurePitGenerator.java index 010fe2c0d..54ad1b377 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/pit/StructurePitGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/pit/StructurePitGenerator.java @@ -218,9 +218,9 @@ public GeneratorResult generate(World world, Random random, // TODO move to own method // populate vanilla spawners for (ICoords c : spawnerCoords) { - ICoords c2 = roomCoords.add(c); - world.setBlockState(c2.toPos(), Blocks.MOB_SPAWNER.getDefaultState()); - TileEntityMobSpawner te = (TileEntityMobSpawner) world.getTileEntity(c2.toPos()); +// ICoords c2 = roomCoords.add(c); + world.setBlockState(c.toPos(), Blocks.MOB_SPAWNER.getDefaultState()); + TileEntityMobSpawner te = (TileEntityMobSpawner) world.getTileEntity(c.toPos()); ResourceLocation r = DungeonHooks.getRandomDungeonMob(random); te.getSpawnerBaseLogic().setEntityId(r); } @@ -228,9 +228,9 @@ public GeneratorResult generate(World world, Random random, // TODO move to own method // populate proximity spawners for (ICoords c : proximityCoords) { - ICoords c2 = roomCoords.add(c); - world.setBlockState(c2.toPos(), TreasureBlocks.PROXIMITY_SPAWNER.getDefaultState()); - ProximitySpawnerTileEntity te = (ProximitySpawnerTileEntity) world.getTileEntity(c2.toPos()); +// ICoords c2 = roomCoords.add(c); + world.setBlockState(c.toPos(), TreasureBlocks.PROXIMITY_SPAWNER.getDefaultState()); + ProximitySpawnerTileEntity te = (ProximitySpawnerTileEntity) world.getTileEntity(c.toPos()); ResourceLocation r = DungeonHooks.getRandomDungeonMob(random); te.setMobName(r); te.setMobNum(new Quantity(1, 2)); diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/IRuinGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/IRuinGenerator.java index 7c97ed01c..0f8ad6aac 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/IRuinGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/IRuinGenerator.java @@ -36,11 +36,6 @@ public interface IRuinGenerator> { GeneratorResult generate(World world, Random random, ICoords spawnCoords); GeneratorResult generate(World world, Random random, ICoords originalSpawnCoords, IDecayRuleSet decayRuleSet); - -// void buildOneTimeSpawners(World world, Random random, ICoords spawnCoords, List proximityCoords, -// Quantity quantity, double d); -// -// void buildVanillaSpawners(World world, Random random, ICoords spawnCoords, List spawnerCoords); default public TemplateHolder selectTemplate(World world, Random random, ICoords coords, StructureArchetype archetype, StructureType type) { // get the biome ID @@ -48,12 +43,11 @@ default public TemplateHolder selectTemplate(World world, Random random, ICoords TemplateHolder holder = Treasure.TEMPLATE_MANAGER.getTemplate(world, random, archetype, type, biome); return holder; } - - default public void buildOneTimeSpawners(World world, Random random, ICoords spawnCoords, List proximityCoords, Quantity quantity, double d) { + + default public void buildOneTimeSpawners(World world, Random random, List proximityCoords, Quantity quantity, double d) { for (ICoords c : proximityCoords) { - ICoords c2 = spawnCoords.add(c); - world.setBlockState(c2.toPos(), TreasureBlocks.PROXIMITY_SPAWNER.getDefaultState()); - ProximitySpawnerTileEntity te = (ProximitySpawnerTileEntity) world.getTileEntity(c2.toPos()); + world.setBlockState(c.toPos(), TreasureBlocks.PROXIMITY_SPAWNER.getDefaultState()); + ProximitySpawnerTileEntity te = (ProximitySpawnerTileEntity) world.getTileEntity(c.toPos()); ResourceLocation r = DungeonHooks.getRandomDungeonMob(random); te.setMobName(r); te.setMobNum(new Quantity(1, 2)); @@ -61,11 +55,10 @@ default public void buildOneTimeSpawners(World world, Random random, ICoords spa } } - default public void buildVanillaSpawners(World world, Random random, ICoords spawnCoords, List spawnerCoords) { + default public void buildVanillaSpawners(World world, Random random, List spawnerCoords) { for (ICoords c : spawnerCoords) { - ICoords c2 = spawnCoords.add(c); - world.setBlockState(c2.toPos(), Blocks.MOB_SPAWNER.getDefaultState()); - TileEntityMobSpawner te = (TileEntityMobSpawner) world.getTileEntity(c2.toPos()); + world.setBlockState(c.toPos(), Blocks.MOB_SPAWNER.getDefaultState()); + TileEntityMobSpawner te = (TileEntityMobSpawner) world.getTileEntity(c.toPos()); ResourceLocation r = DungeonHooks.getRandomDungeonMob(random); te.getSpawnerBaseLogic().setEntityId(r); } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java index 51d9cabf7..6719e4c3b 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java @@ -10,6 +10,8 @@ import com.someguyssoftware.gottschcore.positional.Coords; import com.someguyssoftware.gottschcore.positional.ICoords; import com.someguyssoftware.gottschcore.world.WorldInfo; +import com.someguyssoftware.gottschcore.world.gen.structure.DecayProcessor; +import com.someguyssoftware.gottschcore.world.gen.structure.IDecayProcessor; import com.someguyssoftware.gottschcore.world.gen.structure.IDecayRuleSet; import com.someguyssoftware.gottschcore.world.gen.structure.StructureMarkers; import com.someguyssoftware.treasure2.Treasure; @@ -18,6 +20,7 @@ import com.someguyssoftware.treasure2.generator.GeneratorResult; import com.someguyssoftware.treasure2.generator.TemplateGeneratorData; import com.someguyssoftware.treasure2.meta.StructureArchetype; +import com.someguyssoftware.treasure2.meta.StructureMeta; import com.someguyssoftware.treasure2.meta.StructureType; import com.someguyssoftware.treasure2.tileentity.ProximitySpawnerTileEntity; import com.someguyssoftware.treasure2.world.gen.structure.TemplateGenerator; @@ -121,8 +124,28 @@ public GeneratorResult generate(World world, Random rando // this is the coords that need to be supplied to the template generator to allow // the structure to generator in the correct place originalSpawnCoords = new Coords(originalSpawnCoords.getX(), actualSpawnCoords.getY(), originalSpawnCoords.getZ()); - - GeneratorResult genResult = generator.generate(world, random, holder, placement, originalSpawnCoords); + + // NOTE don't like this here and then AGAIN in TemplateGenerator + // get the rule set from the meta which is in the holder + StructureMeta meta = (StructureMeta) Treasure.META_MANAGER.getMetaMap().get(holder.getMetaLocation().toString()); + if (meta == null) { + Treasure.logger.debug("Unable to locate meta data for template -> {}", holder.getLocation()); + return result.fail(); + } + + // setup the decay ruleset and processor + IDecayProcessor decayProcessor = null; + if (decayRuleSet == null && holder.getDecayRuleSetLocation() != null) { + // create a decay processor + decayRuleSet = Treasure.DECAY_MANAGER.getRuleSetMap().get(holder.getDecayRuleSetLocation().toString()); + Treasure.logger.debug("decayRuleSet -> {}", decayRuleSet); + // if decayRuleSet is null the processor should be null + } + if (decayRuleSet != null) { + decayProcessor = new DecayProcessor(Treasure.instance.getInstance(), decayRuleSet); + } + + GeneratorResult genResult = generator.generate(world, random, decayProcessor, holder, placement, originalSpawnCoords); if (!genResult.isSuccess()) return result.fail(); Treasure.logger.debug("submerged gen result -> {}", genResult); @@ -132,37 +155,13 @@ public GeneratorResult generate(World world, Random rando List proximityCoords = (List) genResult.getData().getMap().get(GenUtil.getMarkerBlock(StructureMarkers.PROXIMITY_SPAWNER)); // populate vanilla spawners - buildVanillaSpawners(world, random, genResult.getData().getSpawnCoords(), spawnerCoords); + buildVanillaSpawners(world, random, spawnerCoords); // populate proximity spawners - buildOneTimeSpawners(world, random, genResult.getData().getSpawnCoords(), proximityCoords, new Quantity(1,2), 5D); + buildOneTimeSpawners(world, random, proximityCoords, new Quantity(1,2), 5D); result.setData(genResult.getData()); return result.success(); - } - -// @Override -// public void buildOneTimeSpawners(World world, Random random, ICoords spawnCoords, List proximityCoords, Quantity quantity, double d) { -// for (ICoords c : proximityCoords) { -// ICoords c2 = spawnCoords.add(c); -// world.setBlockState(c2.toPos(), TreasureBlocks.PROXIMITY_SPAWNER.getDefaultState()); -// ProximitySpawnerTileEntity te = (ProximitySpawnerTileEntity) world.getTileEntity(c2.toPos()); -// ResourceLocation r = DungeonHooks.getRandomDungeonMob(random); -// te.setMobName(r); -// te.setMobNum(new Quantity(1, 2)); -// te.setProximity(5D); -// } -// } -// -// @Override -// public void buildVanillaSpawners(World world, Random random, ICoords spawnCoords, List spawnerCoords) { -// for (ICoords c : spawnerCoords) { -// ICoords c2 = spawnCoords.add(c); -// world.setBlockState(c2.toPos(), Blocks.MOB_SPAWNER.getDefaultState()); -// TileEntityMobSpawner te = (TileEntityMobSpawner) world.getTileEntity(c2.toPos()); -// ResourceLocation r = DungeonHooks.getRandomDungeonMob(random); -// te.getSpawnerBaseLogic().setEntityId(r); -// } -// } + } } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java index 36a879e7d..01a98b8ce 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java @@ -139,7 +139,7 @@ public GeneratorResult generate(World world, Random rando // setup the decay ruleset and processor IDecayProcessor decayProcessor = null; - if (decayRuleSet == null) { + if (decayRuleSet == null && holder.getDecayRuleSetLocation() != null) { // create a decay processor decayRuleSet = Treasure.DECAY_MANAGER.getRuleSetMap().get(holder.getDecayRuleSetLocation().toString()); Treasure.logger.debug("decayRuleSet -> {}", decayRuleSet); @@ -166,11 +166,13 @@ public GeneratorResult generate(World world, Random rando List spawnerCoords = (List) genResult.getData().getMap().get(GenUtil.getMarkerBlock(StructureMarkers.SPAWNER)); List proximityCoords = (List) genResult.getData().getMap().get(GenUtil.getMarkerBlock(StructureMarkers.PROXIMITY_SPAWNER)); + // TODO these are wrong because we are adding the *new rotation calculated* spawnCoords and adding to the relative coords of the spawners + // TODO they need to be relative to the original plus the offset.... this should be accomplished when records to real-world coords // populate vanilla spawners - buildVanillaSpawners(world, random, genResult.getData().getSpawnCoords(), spawnerCoords); + buildVanillaSpawners(world, random, spawnerCoords); // populate proximity spawners - buildOneTimeSpawners(world, random, genResult.getData().getSpawnCoords(), proximityCoords, new Quantity(1,2), 5D); + buildOneTimeSpawners(world, random, proximityCoords, new Quantity(1,2), 5D); result.setData(genResult.getData()); diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java index ffaaca22b..6f5038186 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java @@ -106,17 +106,18 @@ public GeneratorResult generate(World world, Random rando Treasure.logger.debug("added blocks to the world."); // TODO do this BEFORE removing specials - // process all markers and adding them to the result data (relative positioned) + // process all markers and adding them to the result data (absolute positioned) for (Entry entry : template.getMap().entries()) { ICoords c = new Coords(GottschTemplate.transformedCoords(placement, entry.getValue())); + c = spawnCoords.add(c); result.getData().getMap().put(entry.getKey(), c); - Treasure.logger.debug("adding to structure info transformed coords -> {} : {}", entry.getKey().getLocalizedName(), c.toShortString()); + Treasure.logger.debug("adding to structure info absoluted transformed coords -> {} : {}", entry.getKey().getLocalizedName(), c.toShortString()); } // find the chest and update chest coords (absolute positioned) List chestCoordsList = (List) result.getData().getMap().get(GenUtil.getMarkerBlock(StructureMarkers.CHEST)); if (!chestCoordsList.isEmpty()) { - ICoords chestCoords = spawnCoords.add(chestCoordsList.get(0)); + ICoords chestCoords = chestCoordsList.get(0); result.getData().setChestCoords(chestCoords); // get the block state of the chest IBlockState chestState = world.getBlockState(chestCoords.toPos()); diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SurfaceChestWorldGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SurfaceChestWorldGenerator.java index 3ccad95f3..acbac41f6 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SurfaceChestWorldGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SurfaceChestWorldGenerator.java @@ -336,12 +336,10 @@ private GeneratorResult generate(World world, Random random, ICoo } // set the chest coords to the surface pos chestCoords = genResult.getData().getChestCoords(); - Treasure.logger.debug("Above ground structure coords -> {}", chestCoords.toShortString()); } else { // set the chest coords to the surface pos chestCoords = new Coords(markerCoords); - Treasure.logger.debug("Above ground, chest only coords -> {}", chestCoords.toShortString()); } } else if (config.isSubterraneanAllowed()) { diff --git a/Treasure2-1.12.2/src/resources/assets/treasure2/blockstates/clam_chest.json b/Treasure2-1.12.2/src/resources/assets/treasure2/blockstates/clam_chest.json deleted file mode 100644 index 0bb49fc76..000000000 --- a/Treasure2-1.12.2/src/resources/assets/treasure2/blockstates/clam_chest.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "variants": { - "normal": { "model": "treasure2:clam_chest" }, - "facing=north": { "model": "treasure2:clam_chest" }, - "facing=south": { "model": "treasure2:clam_chest", "y": 180, "uvlock": true }, - "facing=west": { "model": "treasure2:clam_chest", "y": 270, "uvlock": true }, - "facing=east": { "model": "treasure2:clam_chest", "y": 90, "uvlock": true }, - "facing=up": { "model": "treasure2:clam_chest" }, - "facing=down": { "model": "treasure2:clam_chest" } - } -} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/clam_chest.json b/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/clam_chest.json deleted file mode 100644 index 17a6af32a..000000000 --- a/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/clam_chest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "treasure2:block/clam_chest", - "display": { - "thirdperson": { - "rotation": [ 180, -90, 170 ], - "translation": [ 0, 1, -3 ], - "scale": [ 1.4, 1.4, 1.4 ] - } - } -} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/clam_meat.json b/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/clam_meat.json deleted file mode 100644 index c838ff816..000000000 --- a/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/clam_meat.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "treasure2:items/clam_meat" - }, - "display": { - "thirdperson_righthand": { - "translation": [ 0, 1, 0], - "scale":[ 0.25, 0.25, 0.25] - }, - "firstperson_righthand": { - "translation": [ 0, 2, 0], - "scale": [ 0.5, 0.5, 0.5 ] - }, - "ground": { - "rotation": [ 0, 0, 0 ], - "translation": [ 0, 1, 0], - "scale":[ 0.25, 0.25, 0.25] - } - } -} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/clam_stew.json b/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/clam_stew.json deleted file mode 100644 index 5785e1ca8..000000000 --- a/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/clam_stew.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "treasure2:items/clam_stew" - }, - "display": { - "thirdperson_righthand": { - "translation": [ 0, 1, 0], - "scale":[ 0.25, 0.25, 0.25] - }, - "firstperson_righthand": { - "translation": [ 0, 2, 0], - "scale": [ 0.5, 0.5, 0.5 ] - }, - "ground": { - "rotation": [ 0, 0, 0 ], - "translation": [ 0, 1, 0], - "scale":[ 0.25, 0.25, 0.25] - } - } -} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/oyster_chest.json b/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/oyster_chest.json deleted file mode 100644 index 17a6af32a..000000000 --- a/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/oyster_chest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "treasure2:block/clam_chest", - "display": { - "thirdperson": { - "rotation": [ 180, -90, 170 ], - "translation": [ 0, 1, -3 ], - "scale": [ 1.4, 1.4, 1.4 ] - } - } -} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/oyster_meat.json b/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/oyster_meat.json deleted file mode 100644 index df1820ce4..000000000 --- a/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/oyster_meat.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "treasure2:items/oyster_meat" - }, - "display": { - "thirdperson_righthand": { - "translation": [ 0, 1, 0], - "scale":[ 0.25, 0.25, 0.25] - }, - "firstperson_righthand": { - "translation": [ 0, 2, 0], - "scale": [ 0.5, 0.5, 0.5 ] - }, - "ground": { - "rotation": [ 0, 0, 0 ], - "translation": [ 0, 1, 0], - "scale":[ 0.25, 0.25, 0.25] - } - } -} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/oyster_stew.json b/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/oyster_stew.json deleted file mode 100644 index e131ef6ce..000000000 --- a/Treasure2-1.12.2/src/resources/assets/treasure2/models/item/oyster_stew.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "treasure2:items/oyster_stew" - }, - "display": { - "thirdperson_righthand": { - "translation": [ 0, 1, 0], - "scale":[ 0.25, 0.25, 0.25] - }, - "firstperson_righthand": { - "translation": [ 0, 2, 0], - "scale": [ 0.5, 0.5, 0.5 ] - }, - "ground": { - "rotation": [ 0, 0, 0 ], - "translation": [ 0, 1, 0], - "scale":[ 0.25, 0.25, 0.25] - } - } -} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/decay/treasure2/default_ruleset.json b/Treasure2-1.12.2/src/resources/decay/treasure2/default_ruleset.json index a754f524f..7bb4feb50 100644 --- a/Treasure2-1.12.2/src/resources/decay/treasure2/default_ruleset.json +++ b/Treasure2-1.12.2/src/resources/decay/treasure2/default_ruleset.json @@ -1,54 +1,118 @@ { - "verticalDecayRate": { - "min": 5.0, - "max": 10.0 - }, - "initialBlockStrength": 100.0, - "blockStrengthThreshold": 0.0, - "blockStrengthDecayRate": { - "min": 12.5, - "max": 20.0 - }, - "blockStrengthDistanceDecayRate": { - "min": 22.0, - "max": 30.0 - }, - "decayRules": { - "minecraft:stonebrick": { - "block": "minecraft:stonebrick", - "decayIterations": 5, - "decayProbability": 20.0, - "decayBlocks": [ - "minecraft:stonebrick@1", - "minecraft:stonebrick@2", - "minecraft:cobblestone@0", - "minecraft:gravel@0", - "minecraft:air@0" - ] - }, - "minecraft:stone_brick_stairs": { - "block": "minecraft:stone_brick_stairs", - "decayIterations": 2, - "decayProbability": 15.0, - "decayBlocks": [ - "minecraft:stone_stairs@0", - "minecraft:air@0" - ] + "verticalDecayRate": { + "min": 5.0, + "max": 10.0 }, - "minecraft:log": { - "block": "minecraft:log", - "decayIterations": 1, - "decayProbability": 15.0, - "decayBlocks": [ - "minecraft:air@0" - ] + "initialBlockStrength": 100.0, + "blockStrengthThreshold": 0.0, + "blockStrengthDecayRate": { + "min": 12.5, + "max": 20.0 }, - "default": { - "decayIterations": 1, - "decayProbability": 15.0, - "decayBlocks": [ - "minecraft:air@0" - ] + "blockStrengthDistanceDecayRate": { + "min": 22.0, + "max": 30.0 + }, + "decayRules": { + "minecraft:stonebrick": { + "decayIterations": 5, + "decayProbability": 20.0, + "decayBlocks": [ + "minecraft:stonebrick@1", + "minecraft:stonebrick@2", + "minecraft:cobblestone@0", + "minecraft:gravel@0", + "minecraft:air@0" + ] + }, + "minecraft:cobblestone": { + "decayIterations": 3, + "decayProbability": 20.0, + "decayBlocks": [ + "minecraft:mossy_cobblestone@0", + "minecraft:gravel@0", + "minecraft:air@0" + ] + }, + "minecraft:mossy_cobblestone": { + "decayIterations": 2, + "decayProbability": 20.0, + "decayBlocks": [ + "minecraft:gravel@0", + "minecraft:air@0" + ] + }, + "minecraft:stone_brick_stairs": { + "decayIterations": 2, + "decayProbability": 15.0, + "decayBlocks": [ + "minecraft:stone_stairs@0", + "minecraft:air@0" + ] + }, + "minecraft:stone_brick_slab": { + "decayIterations": 3, + "decayProbability": 15.0, + "decayBlocks": [ + "minecraft:stone_slab@0", + "minecraft:stone_slab@3", + "minecraft:air@0" + ] + }, + "minecraft:stone_slab": { + "decayIterations": 2, + "decayProbability": 15.0, + "decayBlocks": [ + "minecraft:stone_slab@3", + "minecraft:air@0" + ] + }, + "minecraft:cobblestone_wall": { + "decayIterations": 2, + "decayProbability": 15.0, + "decayBlocks": [ + "minecraft:cobblestone_wall@1", + "minecraft:air@0" + ] + }, + "minecraft:smooth_granite": { + "decayIterations": 2, + "decayProbability": 15.0, + "decayBlocks": [ + "minecraft:stone@1", + "minecraft:air@0" + ] + }, + "minecraft:smooth_diorite": { + "decayIterations": 2, + "decayProbability": 15.0, + "decayBlocks": [ + "minecraft:stone@3", + "minecraft:air@0" + ] + }, + "minecraft:smooth_andesite": { + "decayIterations": 2, + "decayProbability": 15.0, + "decayBlocks": [ + "minecraft:stone@5", + "minecraft:air@0" + ] + }, + "minecraft:smooth_sandstone": { + "decayIterations": 2, + "decayProbability": 15.0, + "decayBlocks": [ + "minecraft:sandstone@0", + "minecraft:air@0" + ] + }, + "default": { + "decayIterations": 1, + "decayProbability": 15.0, + "decayBlocks": [ + "minecraft:air@0" + ] + } } - } } \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/decay/treasure2/ruinous_ruleset.json b/Treasure2-1.12.2/src/resources/decay/treasure2/ruinous_ruleset.json index 255cba61e..9aa1a723b 100644 --- a/Treasure2-1.12.2/src/resources/decay/treasure2/ruinous_ruleset.json +++ b/Treasure2-1.12.2/src/resources/decay/treasure2/ruinous_ruleset.json @@ -15,7 +15,6 @@ }, "decayRules": { "minecraft:stonebrick": { - "block": "minecraft:stonebrick", "decayIterations": 6, "decayProbability": 30.0, "decayBlocks": [ @@ -26,8 +25,24 @@ "minecraft:air@0" ] }, + "minecraft:cobblestone": { + "decayIterations": 4, + "decayProbability": 30.0, + "decayBlocks": [ + "minecraft:mossy_cobblestone@0", + "minecraft:gravel@0", + "minecraft:air@0" + ] + }, + "minecraft:mossy_cobblestone": { + "decayIterations": 3, + "decayProbability": 25.0, + "decayBlocks": [ + "minecraft:gravel@0", + "minecraft:air@0" + ] + }, "minecraft:stone_brick_stairs": { - "block": "minecraft:stone_brick_stairs", "decayIterations": 3, "decayProbability": 25.0, "decayBlocks": [ @@ -35,13 +50,69 @@ "minecraft:air@0" ] }, - "minecraft:log": { - "block": "minecraft:log", - "decayIterations": 2, - "decayProbability": 25.0, - "decayBlocks": [ - "minecraft:air@0" - ] - } + "minecraft:stone_brick_slab": { + "decayIterations": 4, + "decayProbability": 20.0, + "decayBlocks": [ + "minecraft:stone_slab@0", + "minecraft:stone_slab@3", + "minecraft:air@0" + ] + }, + "minecraft:stone_slab": { + "decayIterations": 3, + "decayProbability": 20.0, + "decayBlocks": [ + "minecraft:stone_slab@3", + "minecraft:air@0" + ] + }, + "minecraft:cobblestone_wall": { + "decayIterations": 3, + "decayProbability": 20.0, + "decayBlocks": [ + "minecraft:cobblestone_wall@1", + "minecraft:air@0" + ] + }, + "minecraft:smooth_granite": { + "decayIterations": 3, + "decayProbability": 20.0, + "decayBlocks": [ + "minecraft:stone@1", + "minecraft:air@0" + ] + }, + "minecraft:smooth_diorite": { + "decayIterations": 3, + "decayProbability": 20.0, + "decayBlocks": [ + "minecraft:stone@3", + "minecraft:air@0" + ] + }, + "minecraft:smooth_andesite": { + "decayIterations": 3, + "decayProbability": 20.0, + "decayBlocks": [ + "minecraft:stone@5", + "minecraft:air@0" + ] + }, + "minecraft:smooth_sandstone": { + "decayIterations": 3, + "decayProbability": 20.0, + "decayBlocks": [ + "minecraft:sandstone@0", + "minecraft:air@0" + ] + }, + "default": { + "decayIterations": 2, + "decayProbability": 20.0, + "decayBlocks": [ + "minecraft:air@0" + ] + } } } \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/loot_tables/treasure2/chests/special/clam_chest.json b/Treasure2-1.12.2/src/resources/loot_tables/treasure2/chests/special/clam_chest.json deleted file mode 100644 index 489c633a1..000000000 --- a/Treasure2-1.12.2/src/resources/loot_tables/treasure2/chests/special/clam_chest.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "pools": [ - { - "name": "treasure", - "rolls": 1, - "entries": [ - { - "entryName": "clam_meat", - "type": "item", - "name": "treasure2:clam_meat", - "weight": 80, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 3 - } - } - ] - }, - { - "entryName": "white_pearl", - "type": "item", - "name": "treasure2:white_pearl", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 2 - } - } - ] - }, - { - "entryName": "black_pearl", - "type": "item", - "name": "treasure2:black_pearl", - "weight": 5 - } - ] - } - ] -} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/loot_tables/treasure2/chests/special/oyster_chest.json b/Treasure2-1.12.2/src/resources/loot_tables/treasure2/chests/special/oyster_chest.json deleted file mode 100644 index 0296db26c..000000000 --- a/Treasure2-1.12.2/src/resources/loot_tables/treasure2/chests/special/oyster_chest.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "pools": [ - { - "name": "treasure", - "rolls": 1, - "entries": [ - { - "entryName": "oyster_meat", - "type": "item", - "name": "treasure2:oyster_meat", - "weight": 75, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 3 - } - } - ] - }, - { - "entryName": "white_pearl", - "type": "item", - "name": "treasure2:white_pearl", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 2 - } - } - ] - }, - { - "entryName": "black_pearl", - "type": "item", - "name": "treasure2:black_pearl", - "weight": 10 - } - ] - } - ] -} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/church1.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/church1.json new file mode 100644 index 000000000..a0b2b3990 --- /dev/null +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/church1.json @@ -0,0 +1,17 @@ +{ + "name": "church1", + "description": "", + "author": "gottsch", + "archetypes": ["surface"], + "type": "ruin", + "themes": ["dungeon"], + "rarities": ["common"], + "biomeWhiteList": [], + "biomeBlackList": [], + "offset": { + "x": 0, + "y": -1, + "z": 0 + }, + "decayRuleSetName": "default_ruleset" +} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/desert-tower2.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/desert-tower2.json new file mode 100644 index 000000000..5557911cf --- /dev/null +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/desert-tower2.json @@ -0,0 +1,12 @@ +{ + "name": "tower1", + "description": "", + "author": "gottsch", + "archetypes": ["surface"], + "type": "ruin", + "themes": ["dungeon"], + "rarities": ["common"], + "biomeWhiteList": ["desert"], + "biomeBlackList": [], + "decayRuleSetName": "default_ruleset" +} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship1.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship1.json index cbf2417b9..e11b48b2d 100644 --- a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship1.json +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship1.json @@ -6,5 +6,6 @@ "type": "ruin", "rarities": ["common"], "biomeWhiteList": ["ocean", "deep_ocean"], - "biomeBlackList": [] + "biomeBlackList": [], + "decayRuleSetName": "default_ruleset" } \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship2.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship2.json index 8c2c81769..2bcbc2a41 100644 --- a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship2.json +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship2.json @@ -6,5 +6,6 @@ "type": "ruin", "rarities": ["common"], "biomeWhiteList": ["ocean", "deep_ocean"], - "biomeBlackList": [] + "biomeBlackList": [], + "decayRuleSetName": "default_ruleset" } \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship3.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship3.json index e637415ab..003a145b2 100644 --- a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship3.json +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship3.json @@ -6,5 +6,6 @@ "type": "ruin", "rarities": ["common"], "biomeWhiteList": ["ocean", "deep_ocean"], - "biomeBlackList": [] + "biomeBlackList": [], + "decayRuleSetName": "default_ruleset" } \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower1.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower1.json new file mode 100644 index 000000000..07f3a9faa --- /dev/null +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower1.json @@ -0,0 +1,12 @@ +{ + "name": "tower1", + "description": "", + "author": "gottsch", + "archetypes": ["surface"], + "type": "ruin", + "themes": ["dungeon"], + "rarities": ["common"], + "biomeWhiteList": [], + "biomeBlackList": [], + "decayRuleSetName": "default_ruleset" +} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower2.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower2.json new file mode 100644 index 000000000..bf72527ff --- /dev/null +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower2.json @@ -0,0 +1,12 @@ +{ + "name": "tower2", + "description": "", + "author": "gottsch", + "archetypes": ["surface"], + "type": "ruin", + "themes": ["dungeon"], + "rarities": ["common"], + "biomeWhiteList": [], + "biomeBlackList": [], + "decayRuleSetName": "default_ruleset" +} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/structures/treasure2/surface/church1.nbt b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/church1.nbt new file mode 100644 index 0000000000000000000000000000000000000000..d4ca0b48e07bd9511be8369b20b65f4e5f4d4c4e GIT binary patch literal 3632 zcmZuz3p~?nAMfpQaHu6>Ns+OXaxdhTLoT%}bY7CVjUsQHoi&Qt>d=WyS)5od~Awa+{F5W6g4znd|#(d`_2h_St89p5Oof{Qtl2_xb+5zegcTbkq8$qOaF~ zZ@uJqAI9b)(^Pswn*ERWBq=EA{pT0OlQ$I^Kl4iJLbS;fxg)WWAU;;E%S^JuD3Ou%H%^a`NRFiA&8oJ_vj#A*A_jBm z^}FMHN@WnzXp~4D=^#Q8p^Q*Mz)6Okrn+xRcGy~uA?-=vd0b}r;sZL(^@)C)6U*o> zEV|GnT`-(;@^Gx!@I9_xje)*Q zR*IoHEdMNSl|;#g`hj2Tgy5@kkGvWSeoa892*2nJ_>yob`aTw~Mt&Anr*??$JYI)L z&dt{FrQ-J2lEKtY{_kPkkVW;oS?OA{%>J&_+0B%b32j}Z331`Sj?xb8!fl=_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s_c5QvAKR9p-A3=Wzfjf0Q7_L zIa8f$faNRSZk&%LojgRlwoW7STB3J- zy|>k9j{HWN$k26iY(%@5NT@d)HC)I~OEtV`^<1);6V4$J>KPit#M7r^r+i&=Y-RHE zhI+$`%;SjY}HM{o$h@f5RWYR?PiHD@wx2Z;Ty%uNP3F; zzr#6EiL$*-NfTcitj{HkIG<};-edd6a$;#3v46*doB9v*#GHxzM~xl+iLo{dhMOjI zV)d_onkV+w6>k1z~Z#7Je?=j4g NyytdyjhCs({{h?z2!sFt literal 0 HcmV?d00001 diff --git a/Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower2.nbt b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower2.nbt new file mode 100644 index 0000000000000000000000000000000000000000..0cdb769ed81cf67579d41d4304ef062c278c4cb4 GIT binary patch literal 4196 zcmb_edtB04+E-H>OLN;M1ygBfXKU1H#9P^>P}|P9yD?@eUPeuf6`jnCTvJg*o3|{* zoPE_qMVW~iP4E)qn3qy%9AQ$-EdvG<*`j0x?+OZv?D;{>Tl4A9*FW%co^yWZJeTkD zeZGj|cg#$G!_twn?+2adFH8>_+=d=~Hc?}bTD8l4Qfz;67xLE0cT%{hZPj!U=BV@j zPj7$tIpbgU&o@Wyk3Kj$SkfdD|GabB!kYOo7Y5%R-6U}LO{q>7UTTof*-sqI)T*Nm z*tmn^j8cXC>HWBC%16V}Db16H$=LNZ<$C{ABjrTaMul_;@oY4kf@+EyPFeuA(G&=2rsE9^|qneE=dYF`2 zrUgCp3FTq}LCn}!mVf^;e97&rmdX_Cn`B>6*Vh3o$pewN1*ZDn+BGtLVU30uKt@ZneBe zg4z1Scs}+EtFm33N+~L03Lf;h<}nM46L{$pn|6TB%-a}?J-Z0EXU|k^S!>&*hYx4D z5^!5!?AA}+84shhAB1tE$f=>Po>Zok4Zid+BEBXZ#pEoWsL$toq=>Xo-1VM7Mmzw% zM_3WWBVU)ST^vBRt+`+;y{)L&ga=lFfn;7Th(2Xpq%Av4x5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:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Thu, 2 Jan 2020 07:45:43 -0500 Subject: [PATCH 08/23] add structures and clean up --- .../someguyssoftware/treasure2/Treasure.java | 5 +- .../gen/structure/TemplateGenerator.java | 13 +- .../structure/TreasureTemplateManager.java | 10 +- .../worldgen/WitherTreeWorldGenerator.java | 1 - .../decay/treasure2/aged_ruleset.json | 118 ++++++++++++++++++ .../treasure2/structures/blacksmith1.json | 17 +++ .../meta/treasure2/structures/house1.json | 17 +++ .../meta/treasure2/structures/ship1.json | 3 +- .../meta/treasure2/structures/ship2.json | 3 +- .../meta/treasure2/structures/ship3.json | 3 +- .../{test-tower.json => tower3.json} | 2 +- .../treasure2/surface/blacksmith1.nbt | Bin 0 -> 2894 bytes .../treasure2/surface/desert-tower2.nbt | Bin 4086 -> 4100 bytes .../structures/treasure2/surface/house1.nbt | Bin 0 -> 5723 bytes .../treasure2/surface/test-small.nbt | Bin 381 -> 0 bytes .../treasure2/surface/test-tower.nbt | Bin 3274 -> 0 bytes .../structures/treasure2/surface/tower1.nbt | Bin 6095 -> 6183 bytes .../structures/treasure2/surface/tower2.nbt | Bin 4196 -> 4009 bytes .../structures/treasure2/surface/tower3.nbt | Bin 0 -> 3077 bytes 19 files changed, 163 insertions(+), 29 deletions(-) create mode 100644 Treasure2-1.12.2/src/resources/decay/treasure2/aged_ruleset.json create mode 100644 Treasure2-1.12.2/src/resources/meta/treasure2/structures/blacksmith1.json create mode 100644 Treasure2-1.12.2/src/resources/meta/treasure2/structures/house1.json rename Treasure2-1.12.2/src/resources/meta/treasure2/structures/{test-tower.json => tower3.json} (93%) create mode 100644 Treasure2-1.12.2/src/resources/structures/treasure2/surface/blacksmith1.nbt create mode 100644 Treasure2-1.12.2/src/resources/structures/treasure2/surface/house1.nbt delete mode 100644 Treasure2-1.12.2/src/resources/structures/treasure2/surface/test-small.nbt delete mode 100644 Treasure2-1.12.2/src/resources/structures/treasure2/surface/test-tower.nbt create mode 100644 Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower3.nbt diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java index 8b89356ee..e16093718 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java @@ -73,7 +73,7 @@ modid=Treasure.MODID, name=Treasure.NAME, version=Treasure.VERSION, - dependencies="required-after:gottschcore@[1.9.0,)", + dependencies="required-after:gottschcore@[1.10.0,)", acceptedMinecraftVersions = "[1.12.2]", updateJSON = Treasure.UPDATE_JSON_URL ) @@ -82,7 +82,8 @@ "Treasure2 was first developed by Mark Gottschling on Jan 2018.", "Credits to Mason Gottschling for ideas and debugging.", "Credits to CuddleBeak for some Keys and Locks textures.", - "Credits to mn_ti for Chinese and to DarkKnightComes for Polish translation." + "Credits to mn_ti for Chinese and to DarkKnightComes for Polish translation.", + "Credits to Mythical Sausage for tutorials on house/tower designs." }) public class Treasure extends AbstractMod { diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java index 6f5038186..8fea2cdb3 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java @@ -103,9 +103,6 @@ public GeneratorResult generate(World world, Random rando template.addBlocksToWorld(world, spawnCoords.toPos(), decayProcessor, placement, getNullBlock(), Treasure.TEMPLATE_MANAGER.getReplacementMap(), 3); } - Treasure.logger.debug("added blocks to the world."); - - // TODO do this BEFORE removing specials // process all markers and adding them to the result data (absolute positioned) for (Entry entry : template.getMap().entries()) { ICoords c = new Coords(GottschTemplate.transformedCoords(placement, entry.getValue())); @@ -126,15 +123,7 @@ public GeneratorResult generate(World world, Random rando Treasure.logger.debug("saving chest state -> {}", chestState.toString()); } } - - // TODO if this is handled on template read, this block can go away - remove this when using GottschCore v1.9.0 - // remove any extra special blocks - for (ICoords mapCoords : template.getMapCoords()) { - ICoords c = GottschTemplate.transformedCoords(placement, mapCoords); - // TODO shouldn't be setting to air, but to null block - world.setBlockToAir(spawnCoords.toPos().add(c.toPos())); - } - + // get the transformed size BlockPos transformedSize = template.transformedSize(placement.getRotation()); Treasure.logger.debug("transformed size -> {}", transformedSize.toString()); diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TreasureTemplateManager.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TreasureTemplateManager.java index 68d3356f0..65ff91a93 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TreasureTemplateManager.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TreasureTemplateManager.java @@ -286,15 +286,13 @@ private void mapToTemplatesByArchetypeBiome(ResourceLocation metaResourceLocatio } /** - * TODO change to getTemplateHolder and return the holder. * @param world * @param random * @param key * @param biome * @return */ - public /*GottschTemplate*/TemplateHolder getTemplate(World world, Random random, StructureArchetype archetype, StructureType type, Biome biome) { - Template template = null; + public TemplateHolder getTemplate(World world, Random random, StructureArchetype archetype, StructureType type, Biome biome) { // get structure by archetype (subterranean) and type (room) String key =archetype.getName() + ":" + type.getName(); @@ -311,11 +309,9 @@ private void mapToTemplatesByArchetypeBiome(ResourceLocation metaResourceLocatio Treasure.logger.debug("could not find random template holder."); return null; } - -// template = holder.getTemplate(); + Treasure.logger.debug("selected template holder -> {} : {}", holder.getLocation(), holder.getMetaLocation()); - -// return (GottschTemplate) template; + return holder; } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/WitherTreeWorldGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/WitherTreeWorldGenerator.java index 9462aebce..9b47fae67 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/WitherTreeWorldGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/WitherTreeWorldGenerator.java @@ -319,7 +319,6 @@ public GeneratorResult generate(World world, Random random, ICoor } // add chest -// WitherChestGenerator chestGen = new WitherChestGenerator(); WitherChestGenerator chestGen = new WitherChestGenerator(); // TODO this is only building the chest... that's what the WitherChestGenerator was for GeneratorResult chestResult = chestGen.generate(world, random, chestCoords, Rarity.SCARCE, null); diff --git a/Treasure2-1.12.2/src/resources/decay/treasure2/aged_ruleset.json b/Treasure2-1.12.2/src/resources/decay/treasure2/aged_ruleset.json new file mode 100644 index 000000000..3e2d04fb3 --- /dev/null +++ b/Treasure2-1.12.2/src/resources/decay/treasure2/aged_ruleset.json @@ -0,0 +1,118 @@ +{ + "verticalDecayRate":{ + "min":4.0, + "max":7.0 + }, + "initialBlockStrength":100.0, + "blockStrengthThreshold":0.0, + "blockStrengthDecayRate":{ + "min":10.5, + "max":15.0 + }, + "blockStrengthDistanceDecayRate":{ + "min":15.0, + "max":25.0 + }, + "decayRules":{ + "minecraft:stonebrick":{ + "decayIterations":5, + "decayProbability":15.0, + "decayBlocks":[ + "minecraft:stonebrick@1", + "minecraft:stonebrick@2", + "minecraft:cobblestone@0", + "minecraft:gravel@0", + "minecraft:air@0" + ] + }, + "minecraft:cobblestone":{ + "decayIterations":3, + "decayProbability":15.0, + "decayBlocks":[ + "minecraft:mossy_cobblestone@0", + "minecraft:gravel@0", + "minecraft:air@0" + ] + }, + "minecraft:mossy_cobblestone":{ + "decayIterations":2, + "decayProbability":15.0, + "decayBlocks":[ + "minecraft:gravel@0", + "minecraft:air@0" + ] + }, + "minecraft:stone_brick_stairs":{ + "decayIterations":2, + "decayProbability":15.0, + "decayBlocks":[ + "minecraft:stone_stairs@0", + "minecraft:air@0" + ] + }, + "minecraft:stone_brick_slab":{ + "decayIterations":3, + "decayProbability":12.0, + "decayBlocks":[ + "minecraft:stone_slab@0", + "minecraft:stone_slab@3", + "minecraft:air@0" + ] + }, + "minecraft:stone_slab":{ + "decayIterations":2, + "decayProbability":12.0, + "decayBlocks":[ + "minecraft:stone_slab@3", + "minecraft:air@0" + ] + }, + "minecraft:cobblestone_wall":{ + "decayIterations":2, + "decayProbability":12.0, + "decayBlocks":[ + "minecraft:cobblestone_wall@1", + "minecraft:air@0" + ] + }, + "minecraft:smooth_granite":{ + "decayIterations":2, + "decayProbability":12.0, + "decayBlocks":[ + "minecraft:stone@1", + "minecraft:air@0" + ] + }, + "minecraft:smooth_diorite":{ + "decayIterations":2, + "decayProbability":12.0, + "decayBlocks":[ + "minecraft:stone@3", + "minecraft:air@0" + ] + }, + "minecraft:smooth_andesite":{ + "decayIterations":2, + "decayProbability":12.0, + "decayBlocks":[ + "minecraft:stone@5", + "minecraft:air@0" + ] + }, + "minecraft:smooth_sandstone":{ + "decayIterations":2, + "decayProbability":12.0, + "decayBlocks":[ + "minecraft:sandstone@0", + "minecraft:air@0" + ] + }, + "default":{ + "decayIterations":1, + "decayProbability":10.0, + "decayBlocks":[ + "minecraft:air@0" + ] + } + } +} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/blacksmith1.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/blacksmith1.json new file mode 100644 index 000000000..c9563ca59 --- /dev/null +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/blacksmith1.json @@ -0,0 +1,17 @@ +{ + "name": "blacksmith1", + "description": "", + "author": "gottsch", + "archetypes": ["surface"], + "type": "ruin", + "themes": ["dungeon"], + "rarities": ["common"], + "biomeWhiteList": [], + "biomeBlackList": ["desert"], + "offset": { + "x": 0, + "y": -1, + "z": 0 + }, + "decayRuleSetName": "default_ruleset" +} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/house1.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/house1.json new file mode 100644 index 000000000..27f500769 --- /dev/null +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/house1.json @@ -0,0 +1,17 @@ +{ + "name": "house1", + "description": "", + "author": "gottsch", + "archetypes": ["surface"], + "type": "ruin", + "themes": ["dungeon"], + "rarities": ["common"], + "biomeWhiteList": [], + "biomeBlackList": ["desert"], + "offset": { + "x": 0, + "y": -1, + "z": 0 + }, + "decayRuleSetName": "default_ruleset" +} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship1.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship1.json index e11b48b2d..cbf2417b9 100644 --- a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship1.json +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship1.json @@ -6,6 +6,5 @@ "type": "ruin", "rarities": ["common"], "biomeWhiteList": ["ocean", "deep_ocean"], - "biomeBlackList": [], - "decayRuleSetName": "default_ruleset" + "biomeBlackList": [] } \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship2.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship2.json index 2bcbc2a41..8c2c81769 100644 --- a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship2.json +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship2.json @@ -6,6 +6,5 @@ "type": "ruin", "rarities": ["common"], "biomeWhiteList": ["ocean", "deep_ocean"], - "biomeBlackList": [], - "decayRuleSetName": "default_ruleset" + "biomeBlackList": [] } \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship3.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship3.json index 003a145b2..e637415ab 100644 --- a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship3.json +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/ship3.json @@ -6,6 +6,5 @@ "type": "ruin", "rarities": ["common"], "biomeWhiteList": ["ocean", "deep_ocean"], - "biomeBlackList": [], - "decayRuleSetName": "default_ruleset" + "biomeBlackList": [] } \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/test-tower.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower3.json similarity index 93% rename from Treasure2-1.12.2/src/resources/meta/treasure2/structures/test-tower.json rename to Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower3.json index 2c0e6db46..eb065ae89 100644 --- a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/test-tower.json +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower3.json @@ -1,5 +1,5 @@ { - "name": "Test", + "name": "tower3", "description": "", "author": "gottsch", "archetypes": ["surface"], diff --git a/Treasure2-1.12.2/src/resources/structures/treasure2/surface/blacksmith1.nbt b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/blacksmith1.nbt new file mode 100644 index 0000000000000000000000000000000000000000..c560243cb22d9ac1f13d36a243d65624c226350f GIT binary patch literal 2894 zcmb7Gdsx!v9!KX&w|bnJQ>RI*rfV7!ZX|7rZKa!;R-Qx?lZ9x<8D@A(6Lp=lQb=7E zqOe)9OtNrFRA36r3mJly7ZL<3LQ00^1x*m$4?Nq6{d1nf^ZcIY{k^x}_x;>nz$AOn z(yvt!pFZ5>BA6KB{xtAO2_e0*ZdOYG8~2`fcxUy;rM4>#sk;Yd`(yXN(~>zn<2-}S zVyeIHd0wIM9~uXRt~Ck+G<0oqdur83$4oI|#O8Rzcm}Y`RwJjn!U|)eQY*xc;*bZ7P35 z+Y)BhYGj8H@!lu6@8crZ*UApf#hTmg+(YVUk4<1v5>$F|T6Py$fwt)=5o~~>en6z$ z|4MY$Nnl#%22B3zyV0{GC}G##(h_IsX+&l5My;Y0TiqNf^xk#V-#5~BE;f13B>X_M z==GDVm0i4FBix;?lI#aN>3`O@r>CEHs!JP5UJmTJGFr0Fw+wfWo7&mbbMQGQYoXse zir!1`Zs$_YJs1Q=zQ*V_{F*%)0rIx3Eb11VI#@R-dDK69_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((^E2(E-ggt#bjx3 zzuhfc(>KA4$uLsO8ljdJe zr>3V$Mv9aZ4FhfGzw_O-@FRN9S55mf!b%ntir%T`9=p>uJy~JDhZ1jO49`lo)(~fE z?~ioO=le04LzrhzgC6j3144=I%wri({W|W1Dok^7^v({=bLA^u3Ho*Sx59g`)rzTs zJx@}|Dk*zyu2^;iO{^Kh9!g2R*W9EMbqWXDHTRsv-{-Qa{qwalbL{DJ<{@&D#X{ye z4D(r;K>af17m9gPavE7S{=G^~a+1H0zk0PWosx9p!+PpyV{$T8HQQzx>oVeaT@&;V z`LIfr#4NpdUnZ9Hc_g6)d&~z)?4RQPXY@Kl?)Bv3zi`_+r54r_C*kqa|CihGTKRl# zj_r7+cK?=iiI*a1$4oP(qS2q<(~Fxv_+%lS`jIAkSfj3%k$r~V?`=Ny`uI-@ z?Bw0KstoK<23bPv%k9&U$(mEtrnNQcih?rbKQhvOy)@2iS{OdA!fwh5Z%yzrHu`@* CWy5g* literal 0 HcmV?d00001 diff --git a/Treasure2-1.12.2/src/resources/structures/treasure2/surface/test-small.nbt b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/test-small.nbt deleted file mode 100644 index a8819684c61b8c9628b56a537e8d58d2ba3a3572..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 381 zcmb2|=3sz;-m8KB%?1Jt53=)f8VrAJkbksUf1iY~aB|J3y@zjK+p*QV`qzW?;unlI zO(>c!!1VXlZe@|I1}?FS{{)yE%5^U7Y?>q!y-j3cH`lb;&G~l8cjNAaHmJ*AUZN<_ zb)xNM{jnPwjTf1knV2>2``8w{ar1EbaH+n~P7jK=T+9OD>Y{Q*_MEp|%*w{9W;=gp z)w3Qki8&^w3vL&%9yPxF@qKeZ(>D2n;w^o%61LUcf1_E%***Q6w&BcO{`OH}zFThE zZ<=^fIQN{Su7SoGR&i7Rr?ZS#uAdXg)O@J)S54EbVzsMtjJ*=J99VE*NmW3A|GA9D zgPy^MF4cUz*Z%Hm+}tybG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RQCV&XRN5z=?P#ccdPo4* zbxW#?&KvWi3xM}11H$eaE4WJ_z2;pMPgwBYX4epSPS>@vCFrLnoJ3gK)o(Q&jChZ#>W(1MdjXlm$9c+kuPep2Ol9 z=dWeol?$;!YaLVPHB2fzgt5I*S+paU&{!oNKY3@4-HMZVi|dn;HY9U$>CK7DL1p=3 zy3t2D{pe#lt^EE3qxVS>=@f|Oj{_{7_ebVanozqb11B}tW8 z*mP>N7XX=Vo=m*!H_fcZybv&r8%!@nQ!s_c5QvAKR9p-A3=Wzfjf0Q7_L zIa8f$faNRSZk&%LojgRlwoW7STB3J- zy|>k9j{HWN$k26iY(%@5NT@d)HC)I~OEtV`^<1);6V4$J>KPit#M7r^r+i&=Y-RHE zhI+$`%;SjY}HM{o$h@f5RWYR?PiHD@wx2Z;Ty%uNP3F; zzr#6EiL$*-NfTcitj{HkIG<};-edd6a$;#3v46*doB9v*#GHxzM~xl+iLo{dhMOjI zV)d_onkV+w6>k1z~Z#7Je?=j4g NyytdyjhCs({{h?z2!sFt diff --git a/Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower2.nbt b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower2.nbt index 0cdb769ed81cf67579d41d4304ef062c278c4cb4..677ca8b63de23a634405d3b514b10462dbf1ccea 100644 GIT binary patch literal 4009 zcmZ`*c|4nG9(S}gRdjl2(GoMAF|8irNZrzDJ2l;AMwKK~Rn*a~)>Tvyg3jnvgY8FE z5K=Xz#4*-5;F^d0$M~+4V={dGox#<9WWv4{`q!rIo*G z?svgoybQf7nk4pJ>TY;6nbY!PaQ*LBbdUrc8(ICk(fR35ZBJ=+J~}Gw&#}+34j4bf zS>EyU(Rf3o{5#*%z7belzT0FkYOfb!`S#Xc#?Sy>OlL$#)jM29m{d&HpfcaY-j4fS zRBfB7c*^+jUKXJ!8e{Ic6y20pktsq?e@C6}rS3_Of7#m6SFp?wG2Oa+3I8~_6n-`F zL0>>A@!`wX-ITtqjTfq*BbkCMet2d*^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structures/treasure2/surface/tower3.nbt new file mode 100644 index 0000000000000000000000000000000000000000..c275f04fd2f20c7f50bf08a38daa12b1d4d85280 GIT binary patch literal 3077 zcmZWreO!{~8dgioWx3T{8Yb47W_A=Y6SbtywmK#D%MUCqmFCxRDg?}rQZd)2)lm0K z9T+C3oR}YhADJS8c33c-qfSmVGd+qyQeX;*V#s+=+p5DK?~nI>p67n0NVbdQ zH`~jIo{}^RX;SxGp5^uV2zcX}^QxAQolT1&4D>>HTm&(Q7N%&qT+m)}4M{5`>w&4*mZ_E7Q!W`PhS{H>btfs4!EDOBl1@JxGv=bllaV8l>7CReA4Ch*(Hxq zCzEBf9hDGRMmsVh=p1eZbdp|h4pV3dbLJX6Bp+?ifqIZcN?_t%lhVJOL1+f@I$tpQ4(Ev=r(RKKJFjMN% ziSDivucQ4;l$jHsx9@pC83B1~d}oMKV?5??L{qi2un|!KGR&laD=_|c>Z;zk)D7c1 zJxR9@fL%j%U$X+IQvXp}1hf@=^`HvV%)J}x&#QkQB&8NV!z_6 zNu%6lTxl0qqfewnOmU8bsyWh!VcgO5y7E#FOw`QAY?qj>l9RRWpvQ!Q5MeXik~)(~ zOtoJ^ZgAh}wpSV4XrBcVGHV~tM?O5ia7sHX(M!%YM|O@Hrlr_H#e>M#F8~p`C&M1m z+{4+8vHiF;zEjEOl;v{9V#@upGlT2g;>=*iU{^_c=r`Ts-l|HQi?f%1PX=ar-LyCt zACmKRR>^eN>gAS!BaD;p8JwyGhwZHYYM5v%&bohYrzF?1Yncre@yV{Rcf8s?F}H=j zeJ@$Dkz53KpqebBDHbD`wRq2vX8zta*LmE|bZBd=F{hlVMI(#DQIEFZ!W-b;2EUv&H3IATuaP6r8AZMtx|%NAxywdx&o>v}JH3I>#LeMq$X-}xPr z!_l{rimwzOD7TUmlsn|sKL57bp;997&BeE+gzVJ^b*mu|;Gnp`_>A8Hg4 zM7qwSYosCvE9XX=;EnXLm~XqfX;4+y9$IdM^g(|n`O|k^d-sD^BeVozIVDZ4GCHkJ zw0I87d;XG+j_#SuOMFTfOH&d?IUhS;%qsU&>O&)q);IMMT_@SMv__*r#Q%Xa|^@>s!1eDVp5RZ<8m$l;eaD8N$1 z?GZWZmezr5G?riH?J5M2070PY27wvqnqVUYBGPu1@+*7q?Q*m|Ad=*0&UV?*9YPo$ zNFLc$^Mi`JS98s73jmbxj0wMiM@^xHwQugVdtyUn4H<1MD}#l7 z<~&P#jheoq6{ZqK2Riaie+8u(7${R7ygc8A|De|fl&x^L%|(3GCyA;%KX$Nu#WayO z$vp&UQ)WeW^~u$DY)Ob)La=}>A))(MQd|o1ZXF0R)x|i&;INoF=%?Z*kh=B~BejgZ zEAo1wD3CFRLsi8GL6i`UZ>toLcR=U{$t^sE^ zjb<4K4t7K|w6bWlC0APCpTUGTGtNdMfwI0fLIBifWx`H!1=RaMS{NR|c%UbJx|et1 zcIszW%rhaS#FPjhS0HOx-@H%}pz&n(p{Qr|IzpevZ9IfxNPstJ2O(9?#!UVyNEwVZkt<3Q|(C>8UpofP6r!; z_3z+p#flBz%#!pCkPY)lLu&S186~F&$!yiW5OM=J)rxA`SQX7Znsd%pjNHI!&!^Bk zGLHTCd?qqr=E(rPBD;0-m_jLuZ|=-&C3S2~(=H6`7zsPm{t=JO=8Uel<|{Z4jyWZZ zp%Im@)D5K9XW<`A>UGk^=`{&OG{qvbbWWvWMf30)U4ce_xA2pE&Ap%4jZdX#OF9-c zgZI08BSjl7etwCb7rxdonW&qhSdm8ekw)})NEwJDGOYg9$oG0_B1($Ye{-qn32s1( z99AS$LHl-38;%#ua%5xvy}#WUDIW8i{gLUtpqEO%az;W&qaSuRlIcRftf?-C$YC6k zTljE*bx9wNcD)qK|HYYUZcQp-^^ iN|MTUSZ?mXH01c6=D8<~k`}8CCUVW#`W<;DCjSGxl Date: Mon, 6 Jan 2020 12:17:14 -0500 Subject: [PATCH 09/23] Update KeyItem.java Fixing number of uses a key has. ex. if the desired amount is 25 uses, the damage property should be set to 24 (0-24 = 25 uses). --- .../src/com/someguyssoftware/treasure2/item/KeyItem.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/KeyItem.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/KeyItem.java index 5ed7144a1..f408e906c 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/KeyItem.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/KeyItem.java @@ -41,6 +41,8 @@ * */ public class KeyItem extends ModItem { + public static final int DEFAULT_MAX_USES = 25; + /* * The category that the key belongs to */ @@ -84,7 +86,7 @@ public KeyItem(String modID, String name) { setBreakable(true); setDamageable(true); setCraftable(false); - setMaxDamage(25); + setMaxDamage(DEFAULT_MAX_USES); setSuccessProbability(90D); setMaxStackSize(1); // 12/3/2018: set to max 1 because keys are damaged and don't stack well. } @@ -363,6 +365,10 @@ public KeyItem setBreakable(boolean breakable) { * @param damage the uses to set */ public KeyItem setMaxDamage(int damage) { + // correct number of uses (damage) for 0-based counting. + if (damage > 0) { + damage = damage - 1; + } super.setMaxDamage(damage); return this; } From 846a76bc092c98f97dcd34640d4a84e9ba6c2762 Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Mon, 6 Jan 2020 12:22:32 -0500 Subject: [PATCH 10/23] Update KeyItem.java Add setMaxUses() method that wraps setMaxDamage(). --- .../treasure2/item/KeyItem.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/KeyItem.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/KeyItem.java index f408e906c..c622712ec 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/KeyItem.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/KeyItem.java @@ -86,7 +86,7 @@ public KeyItem(String modID, String name) { setBreakable(true); setDamageable(true); setCraftable(false); - setMaxDamage(DEFAULT_MAX_USES); + setMaxUses(DEFAULT_MAX_USES); setSuccessProbability(90D); setMaxStackSize(1); // 12/3/2018: set to max 1 because keys are damaged and don't stack well. } @@ -365,13 +365,21 @@ public KeyItem setBreakable(boolean breakable) { * @param damage the uses to set */ public KeyItem setMaxDamage(int damage) { - // correct number of uses (damage) for 0-based counting. - if (damage > 0) { - damage = damage - 1; - } super.setMaxDamage(damage); return this; } + + /** + * A wrapper for setMaxDamage that corrects for 0-based index/counting. + * @param uses the uses to set + */ + public void setMaxUses(int uses) { + int damage = uses - 1; + if (damage < 0) { + damage = 0; + } + setMaxDamage(damage); + } /** * @return the successProbability From 469a7243d3c62b584aed844cd69c672081a19386 Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Mon, 6 Jan 2020 12:25:25 -0500 Subject: [PATCH 11/23] Update TreasureItems.java Update all Key Items to use setMaxUses() instead of setMaxDamage() --- .../treasure2/item/TreasureItems.java | 32 ++++++++----------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/TreasureItems.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/TreasureItems.java index 926bc68ac..5bfaa4ba1 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/TreasureItems.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/TreasureItems.java @@ -116,10 +116,6 @@ public class TreasureItems { public static Item SPANISH_MOSS; public static Item TREASURE_TOOL; public static Item SKELETON; -// public static Item OYSTER_MEAT; -// public static Item CLAM_MEAT; -// public static Item OYSTER_STEW; -// public static Item CLAM_STEW; /* * Materials @@ -149,81 +145,81 @@ public class TreasureItems { .setCategory(Category.BASIC) .setRarity(Rarity.COMMON) .setCraftable(false) - .setMaxDamage(TreasureConfig.KEYS_LOCKS.woodKeyMaxUses); + .setMaxUses(TreasureConfig.KEYS_LOCKS.woodKeyMaxUses); STONE_KEY = new KeyItem(Treasure.MODID, TreasureConfig.STONE_KEY_ID) .setCategory(Category.BASIC) .setRarity(Rarity.COMMON) .setCraftable(false) - .setMaxDamage(TreasureConfig.KEYS_LOCKS.stoneKeyMaxUses); + .setMaxUses(TreasureConfig.KEYS_LOCKS.stoneKeyMaxUses); IRON_KEY = new KeyItem(Treasure.MODID, TreasureConfig.IRON_KEY_ID) .setCategory(Category.METALS) .setRarity(Rarity.UNCOMMON) .setCraftable(false) - .setMaxDamage(TreasureConfig.KEYS_LOCKS.ironKeyMaxUses); + .setMaxUses(TreasureConfig.KEYS_LOCKS.ironKeyMaxUses); GOLD_KEY = new KeyItem(Treasure.MODID, TreasureConfig.GOLD_KEY_ID) .setCategory(Category.METALS) .setRarity(Rarity.SCARCE) .setCraftable(false) - .setMaxDamage(TreasureConfig.KEYS_LOCKS.goldKeyMaxUses); + .setMaxUses(TreasureConfig.KEYS_LOCKS.goldKeyMaxUses); DIAMOND_KEY = new KeyItem(Treasure.MODID, TreasureConfig.DIAMOND_KEY_ID) .setCategory(Category.GEMS) .setRarity(Rarity.RARE) .setBreakable(false) .setCraftable(false) - .setMaxDamage(TreasureConfig.KEYS_LOCKS.diamondKeyMaxUses); + .setMaxUses(TreasureConfig.KEYS_LOCKS.diamondKeyMaxUses); EMERALD_KEY = new KeyItem(Treasure.MODID, TreasureConfig.EMERALD_KEY_ID) .setCategory(Category.GEMS) .setRarity(Rarity.RARE) .setBreakable(false) .setCraftable(false) - .setMaxDamage(TreasureConfig.KEYS_LOCKS.emeraldKeyMaxUses); + .setMaxUses(TreasureConfig.KEYS_LOCKS.emeraldKeyMaxUses); RUBY_KEY = new KeyItem(Treasure.MODID, TreasureConfig.RUBY_KEY_ID) .setCategory(Category.GEMS) .setRarity(Rarity.EPIC) .setBreakable(false) .setCraftable(false) - .setMaxDamage(TreasureConfig.KEYS_LOCKS.rubyKeyMaxUses); + .setMaxUses(TreasureConfig.KEYS_LOCKS.rubyKeyMaxUses); SAPPHIRE_KEY = new KeyItem(Treasure.MODID, TreasureConfig.SAPPHIRE_KEY_ID) .setCategory(Category.GEMS) .setRarity(Rarity.EPIC) .setBreakable(false) .setCraftable(false) - .setMaxDamage(TreasureConfig.KEYS_LOCKS.sapphireKeyMaxUses); + .setMaxUses(TreasureConfig.KEYS_LOCKS.sapphireKeyMaxUses); JEWELLED_KEY = new JewelledKey(Treasure.MODID, TreasureConfig.JEWELLED_KEY_ID) .setCategory(Category.GEMS) .setRarity(Rarity.EPIC) .setBreakable(false) .setCraftable(false) - .setMaxDamage(TreasureConfig.KEYS_LOCKS.jewelledKeyMaxUses); + .setMaxUses(TreasureConfig.KEYS_LOCKS.jewelledKeyMaxUses); METALLURGISTS_KEY = new MetallurgistsKey(Treasure.MODID, TreasureConfig.METALLURGISTS_KEY_ID) .setCategory(Category.METALS) .setRarity(Rarity.RARE) .setBreakable(false) .setCraftable(false) - .setMaxDamage(TreasureConfig.KEYS_LOCKS.metallurgistsKeyMaxUses); + .setMaxUses(TreasureConfig.KEYS_LOCKS.metallurgistsKeyMaxUses); SKELETON_KEY = new SkeletonKey(Treasure.MODID, TreasureConfig.SKELETON_KEY_ID) .setCategory(Category.BASIC) .setRarity(Rarity.RARE) .setBreakable(false) .setCraftable(false) - .setMaxDamage(TreasureConfig.KEYS_LOCKS.skeletonKeyMaxUses); + .setMaxUses(TreasureConfig.KEYS_LOCKS.skeletonKeyMaxUses); SPIDER_KEY = new KeyItem(Treasure.MODID, TreasureConfig.SPIDER_KEY_ID) .setCategory(Category.MOB) .setRarity(Rarity.SCARCE) .setBreakable(true) .setCraftable(true) - .setMaxDamage(TreasureConfig.KEYS_LOCKS.spiderKeyMaxUses); + .setMaxUses(TreasureConfig.KEYS_LOCKS.spiderKeyMaxUses); WITHER_KEY = new KeyItem(Treasure.MODID, TreasureConfig.WITHER_KEY_ID) .setCategory(Category.WITHER) @@ -237,7 +233,7 @@ public class TreasureItems { .setRarity(Rarity.COMMON) .setBreakable(true) .setCraftable(true) - .setMaxDamage(TreasureConfig.KEYS_LOCKS.pilferersLockPickMaxUses) + .setMaxUses(TreasureConfig.KEYS_LOCKS.pilferersLockPickMaxUses) .setSuccessProbability(24); THIEFS_LOCK_PICK = new ThiefsLockPick(Treasure.MODID, TreasureConfig.THIEFS_LOCK_PICK_ID) @@ -245,7 +241,7 @@ public class TreasureItems { .setRarity(Rarity.UNCOMMON) .setBreakable(true) .setCraftable(true) - .setMaxDamage(TreasureConfig.KEYS_LOCKS.thiefsLockPickMaxUses) + .setMaxUses(TreasureConfig.KEYS_LOCKS.thiefsLockPickMaxUses) .setSuccessProbability(32); // KEY RING From ec7d459557042b3e82120f46e25b163273303072 Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Mon, 6 Jan 2020 19:32:06 -0500 Subject: [PATCH 12/23] fixing key uses bug --- Treasure2-1.12.2/build.gradle | 21 ++++++- Treasure2-1.12.2/gradle.properties | 3 +- .../treasure2/config/TreasureConfig.java | 19 +++++- .../treasure2/item/KeyItem.java | 9 --- .../worldgen/WitherTreeWorldGenerator.java | 54 +++++++++--------- .../assets/treasure2/recipes/clam_stew.json | 24 -------- .../assets/treasure2/recipes/oyster_stew.json | 24 -------- .../meta/treasure2/structures/tower4.json | 17 ++++++ .../structures/treasure2/surface/tower4.nbt | Bin 0 -> 4006 bytes Treasure2-1.12.2/update.json | 4 +- 10 files changed, 84 insertions(+), 91 deletions(-) delete mode 100644 Treasure2-1.12.2/src/resources/assets/treasure2/recipes/clam_stew.json delete mode 100644 Treasure2-1.12.2/src/resources/assets/treasure2/recipes/oyster_stew.json create mode 100644 Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower4.json create mode 100644 Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower4.nbt diff --git a/Treasure2-1.12.2/build.gradle b/Treasure2-1.12.2/build.gradle index bc64115b5..e1475fc42 100644 --- a/Treasure2-1.12.2/build.gradle +++ b/Treasure2-1.12.2/build.gradle @@ -91,14 +91,29 @@ reobf { shadowJar {} } +//an array containing destination paths +def destinations = ["${dest_folder}", "${dest_server_folder}"] +println destinations[0] + task deleteOldJar(type: Delete) { delete fileTree("${dest_folder}") { include "**/${mod_name}-*.*" } + delete fileTree("${dest_server_folder}") { + include "**/${mod_name}-*.*" + } + } +task copyJar << { + // iterate over the array with destination paths + destinations.each { destination -> + // for every destination define new CopySpec + println destination + copy { + from jar + into destination + } } -task copyJar(type: Copy) { - from jar - into "${dest_folder}" } + build.dependsOn copyJar copyJar.dependsOn deleteOldJar diff --git a/Treasure2-1.12.2/gradle.properties b/Treasure2-1.12.2/gradle.properties index a5682086a..79a5b6985 100644 --- a/Treasure2-1.12.2/gradle.properties +++ b/Treasure2-1.12.2/gradle.properties @@ -16,4 +16,5 @@ mappings_version=snapshot_20171003 gottschcore_version=1.10.0 # paths -dest_folder=E:/Minecraft/mods/1.12.2/ \ No newline at end of file +dest_folder=E:/Minecraft/mods/1.12.2/ +dest_server_folder=F:/Minecraft Server/mods/ \ No newline at end of file diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/TreasureConfig.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/TreasureConfig.java index e9100bf58..b486f9834 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/TreasureConfig.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/TreasureConfig.java @@ -567,6 +567,8 @@ public static class WitherTree implements IWitherTreeConfig { @RangeDouble(min = 0.0, max = 100.0) public double witherRootItemGenProbability=50.0; + // TODO add all other wither tree probabilities ie coarse dirt gen, etc. + @Name("biomes") @Comment({"Biome white and black list properties."}) public BiomesConfig biomes = new BiomesConfig( @@ -701,76 +703,91 @@ public static class KeysAndLocks { @Comment({"The maximum uses for a given pilferers lock pick."}) @Name("03. Pilferer's lockpick max. uses:") @RangeInt(min = 1, max = 32000) + @RequiresMcRestart public int pilferersLockPickMaxUses = 10; @Comment({"The maximum uses for a given thiefs lock pick."}) @Name("04. Thief's lockpick max. uses:") @RangeInt(min = 1, max = 32000) + @RequiresMcRestart public int thiefsLockPickMaxUses = 10; @Comment({"The maximum uses for a given wooden key."}) @Name("05. Wood key max. uses:") @RangeInt(min = 1, max = 32000) + @RequiresMcRestart public int woodKeyMaxUses = 20; @Comment({"The maximum uses for a given stone key."}) @Name("06. Stone key max uses:") @RangeInt(min = 1, max = 32000) + @RequiresMcRestart public int stoneKeyMaxUses = 10; @Comment({"The maximum uses for a given iron key."}) @Name("07. Iron key max. uses:") @RangeInt(min = 1, max = 32000) + @RequiresMcRestart public int ironKeyMaxUses = 10; @Comment({"The maximum uses for a given gold key."}) @Name("08. Gold key max. uses:") @RangeInt(min = 1, max = 32000) + @RequiresMcRestart public int goldKeyMaxUses = 15; @Comment({"The maximum uses for a given diamond key."}) @Name("09. Diamond key max. uses:") @RangeInt(min = 1, max = 32000) + @RequiresMcRestart public int diamondKeyMaxUses = 20; @Comment({"The maximum uses for a given emerald key."}) @Name("10. Emerald key max. uses:") @RangeInt(min = 1, max = 32000) + @RequiresMcRestart public int emeraldKeyMaxUses = 10; @Comment({"The maximum uses for a given ruby key."}) @Name("11. Ruby key max. uses:") @RangeInt(min = 1, max = 32000) - public int rubyKeyMaxUses = 8; + @RequiresMcRestart + public int rubyKeyMaxUses = 5; @Comment({"The maximum uses for a given sapphire key."}) @Name("12. Sapphire key max. uses:") @RangeInt(min = 1, max = 32000) + @RequiresMcRestart public int sapphireKeyMaxUses = 5; @Comment({"The maximum uses for a given metallurgists key."}) @Name("13. Metallurgists key max. uses:") @RangeInt(min = 1, max = 32000) + @RequiresMcRestart public int metallurgistsKeyMaxUses = 25; @Comment({"The maximum uses for a given skeleton key."}) @Name("14. Skeleton key max. uses:") @RangeInt(min = 1, max =32000) + @RequiresMcRestart public int skeletonKeyMaxUses = 5; @Comment({"The maximum uses for a given jewelled key."}) @Name("15. Jewelled Key max. uses:") @RangeInt(min = 1, max = 32000) + @RequiresMcRestart public int jewelledKeyMaxUses = 5; @Comment({"The maximum uses for a given spider key."}) @Name("16. Spider key max uses:") @RangeInt(min = 1, max = 32000) + @RequiresMcRestart public int spiderKeyMaxUses = 5; @Comment({"The maximum uses for a given wither key."}) @Name("17. Wither key max. uses:") @RangeInt(min = 1, max = 32000) + @RequiresMcRestart public int witherKeyMaxUses = 5; } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/KeyItem.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/KeyItem.java index c622712ec..5b4a9941a 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/KeyItem.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/KeyItem.java @@ -182,15 +182,6 @@ public EnumActionResult onItemUse(EntityPlayer player, World worldIn, BlockPos p LockState lockState = null; boolean isKeyBroken = false; // check if this key is one that opens a lock (only first lock that key fits is unlocked). -// for (LockState ls : tcte.getLockStates()) { -// if (ls.getLock() != null) { -// lockState = ls; -// if (lockState.getLock().acceptsKey(this) || fitsLock(lockState.getLock())) { -// fitsLock = true; -// break; -// } -// } -// } lockState = fitsFirstLock(tcte.getLockStates()); if (lockState != null) { fitsLock = true; diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/WitherTreeWorldGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/WitherTreeWorldGenerator.java index 9b47fae67..a5993e831 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/WitherTreeWorldGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/WitherTreeWorldGenerator.java @@ -53,6 +53,15 @@ public class WitherTreeWorldGenerator implements ITreasureWorldGenerator { public static final int VERTICAL_MAX_DIFF = 3; private static final int CLEARING_RADIUS = 3; + private static final int COARSE_DIRT_PROBABILITY = 75; + private static final int DEGREES = 360; + private static final double MIN_RADIUS = 5.0; + private static final double MAX_RADIUS = 10.0; + private static final int MIN_MAIN_TREE_SIZE = 9; + private static final int MIN_TREE_SIZE = 7; + private static final int WITHER_ROOT_PROBABILITY = 50; + private static final int WITHER_BRANCH_PROBABILITY = 30; + private static final int SPANISH_MOSS_PROBABILITY = 80; FogBlock[] fogDensity = new FogBlock[] { TreasureBlocks.WITHER_FOG, @@ -264,7 +273,7 @@ public GeneratorResult generate(World world, Random random, ICoor buildClearing(world, random, surfaceCoords); // 3. build the main wither tree - buildTrunk(world, random, surfaceCoords, config); + buildMainTree(world, random, surfaceCoords, config); // 4. add the fog if (TreasureConfig.WORLD_GEN.getGeneralProperties().enableWitherFog) { @@ -278,23 +287,19 @@ public GeneratorResult generate(World world, Random random, ICoor for (int treeIndex = 0; treeIndex < numTrees; treeIndex++) { // find a random location around a radius from the tree // ie. rand x-radius, rand z-radius = new point (+x,+z), rand degrees of rotation from origin - double xlen = RandomHelper.randomDouble(5, 10); - double zlen = RandomHelper.randomDouble(5, 10); - int degrees = RandomHelper.randomInt(0, 360); + double xlen = RandomHelper.randomDouble(MIN_RADIUS, MAX_RADIUS); + double zlen = RandomHelper.randomDouble(MIN_RADIUS, MAX_RADIUS); + int degrees = RandomHelper.randomInt(0, DEGREES); ICoords c = witherTreeCoords.rotate(xlen, zlen, degrees); -// Treasure.logger.debug("Rotating by x{}, z{}, deg{} to {}", xlen, zlen, degrees, c); - + // get the yspawn c = WorldInfo.getDryLandSurfaceCoords(world, c); - -// Treasure.logger.debug("Attempting to gen witherED tree @ {}", c.toShortString()); - + // add tree if criteria is met if (c != null && c != WorldInfo.EMPTY_COORDS) { if (c.getDistanceSq(witherTreeCoords) > 4) { if (world.getBlockState(c.toPos()).getBlock() != TreasureBlocks.WITHER_LOG) { -// Treasure.logger.debug("adding witherED tree @ {}", c.toShortString()); buildClearing(world, random, c); buildTree(world, random, c, config); if (TreasureConfig.WORLD_GEN.getGeneralProperties().enablePoisonFog) { @@ -347,15 +352,13 @@ private void buildClearing(World world, Random random, ICoords coords) { // find the first surface int yHeight = WorldInfo.getHeightValue(world, coords.add(xOffset, 255, zOffset)); - // Treasure.logger.debug("Wither Tree Clearing yOffset: " + yHeight); // NOTE have to use GenUtil here because it takes into account // GenericBlockContainer buildCoords = WorldInfo.getDryLandSurfaceCoords(world, new Coords(coords.getX() + xOffset, yHeight, coords.getZ() + zOffset)); - // Treasure.logger.debug("Wither Tree Clearing buildPos: " + buildPos); // additional check that it's not a tree and within 2 y-blocks of original if (Math.abs(buildCoords.getY() - coords.getY()) < VERTICAL_MAX_DIFF) { - if (RandomHelper.checkProbability(random, 75)) { + if (RandomHelper.checkProbability(random, COARSE_DIRT_PROBABILITY)) { world.setBlockState(buildCoords.add(0, -1, 0).toPos(), Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.COARSE_DIRT)); } } @@ -385,7 +388,7 @@ public void buildTree(World world, Random random, ICoords coords, IWitherTreeCon // build a small wither tree ie one trunk // determine the size of the main trunk - int maxSize = RandomHelper.randomInt(random, 7, config.getMaxTrunkSize()); + int maxSize = RandomHelper.randomInt(random, MIN_TREE_SIZE, config.getMaxTrunkSize()); boolean hasLifeBeenAdded = false; for (int y = 0; y < maxSize; y++) { @@ -418,7 +421,7 @@ else if (y > 3) { * @param world * @param coords */ - public void buildTrunk(World world, Random random, ICoords coords, IWitherTreeConfig config) { + public void buildMainTree(World world, Random random, ICoords coords, IWitherTreeConfig config) { // setup an array of coords ICoords[] trunkCoords = new Coords[4]; trunkCoords[0] = coords; @@ -427,7 +430,7 @@ public void buildTrunk(World world, Random random, ICoords coords, IWitherTreeCo trunkCoords[3] = coords.add(1, 0, 1); // determine the size of the main trunk - int maxSize = RandomHelper.randomInt(random, 9, config.getMaxTrunkSize()); + int maxSize = RandomHelper.randomInt(random, MIN_MAIN_TREE_SIZE, config.getMaxTrunkSize()); // build a 2x2 trunk boolean hasLifeBeenAdded = false; @@ -466,7 +469,6 @@ else if (y >= 3) { if (maxSize > 3) { maxSize -= RandomHelper.randomInt(random, 1, 3); maxSize = Math.max(3, maxSize); -// Treasure.logger.debug("master tree new maxSize: {}", maxSize); } } @@ -499,7 +501,7 @@ private void addTop(World world, Random random, ICoords coords, int y, Direction private void addRoot(World world, Random random, ICoords coords, List directions) { // for each direction for (Direction d : directions) { - if (RandomHelper.checkProbability(random, 50)) { + if (RandomHelper.checkProbability(random, WITHER_ROOT_PROBABILITY)) { // update the coords to the correct position ICoords c = coords.add(d, 1); Cube groundCube = new Cube(world, c.down(1)); @@ -532,7 +534,7 @@ private void addBranch(World world, Random random, ICoords trunkCoords, int y, // for each direction for (Direction d : directions) { // randomize if a branch is generated - if (RandomHelper.checkProbability(random, 30)) { + if (RandomHelper.checkProbability(random, WITHER_BRANCH_PROBABILITY)) { // for the num of branch segments ICoords c = trunkCoords; for (int segment = 0; segment < branchSize; segment++) { @@ -549,16 +551,14 @@ private void addBranch(World world, Random random, ICoords trunkCoords, int y, // add the branch to the world world.setBlockState(c.add(0, y, 0).toPos(), state); -// Treasure.logger.debug("Wither Tree building branch @ " + c.add(0, y, 0).toShortString()); - + // add spanish moss - if (RandomHelper.checkProbability(random, 20)) continue; - - replaceCube = new Cube(world, c.add(0, y-1, 0)); - if (replaceCube.isAir() || replaceCube.isReplaceable()) { - world.setBlockState(c.add(0, y-1, 0).toPos(), TreasureBlocks.SPANISH_MOSS.getDefaultState()); + if (RandomHelper.checkProbability(random, SPANISH_MOSS_PROBABILITY)) { + replaceCube = new Cube(world, c.add(0, y-1, 0)); + if (replaceCube.isAir() || replaceCube.isReplaceable()) { + world.setBlockState(c.add(0, y-1, 0).toPos(), TreasureBlocks.SPANISH_MOSS.getDefaultState()); + } } - } else { break; diff --git a/Treasure2-1.12.2/src/resources/assets/treasure2/recipes/clam_stew.json b/Treasure2-1.12.2/src/resources/assets/treasure2/recipes/clam_stew.json deleted file mode 100644 index bbb38cfb7..000000000 --- a/Treasure2-1.12.2/src/resources/assets/treasure2/recipes/clam_stew.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "treasure2:treasure_tool" - }, - { - "item": "minecraft:bowl", - "data": 0 - }, - { - "item": "treasure2:clam_meat", - "data": 0 - }, - { - "item": "minecraft:milk_bucket", - "data": 0 - } - ], - "result": { - "item": "treasure2:clam_stew", - "count": 1 - } -} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/assets/treasure2/recipes/oyster_stew.json b/Treasure2-1.12.2/src/resources/assets/treasure2/recipes/oyster_stew.json deleted file mode 100644 index 6323fd8da..000000000 --- a/Treasure2-1.12.2/src/resources/assets/treasure2/recipes/oyster_stew.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "treasure2:treasure_tool" - }, - { - "item": "minecraft:bowl", - "data": 0 - }, - { - "item": "treasure2:oyster_meat", - "data": 0 - }, - { - "item": "minecraft:milk_bucket", - "data": 0 - } - ], - "result": { - "item": "treasure2:oyster_stew", - "count": 1 - } -} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower4.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower4.json new file mode 100644 index 000000000..7d96da008 --- /dev/null +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower4.json @@ -0,0 +1,17 @@ +{ + "name": "tower4", + "description": "", + "author": "gottsch", + "archetypes": ["surface"], + "type": "ruin", + "themes": ["dungeon"], + "rarities": ["common"], + "biomeWhiteList": [], + "biomeBlackList": [], + "offset": { + "x": 0, + "y": -1, + "z": 0 + }, + "decayRuleSetName": "default_ruleset" +} \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower4.nbt b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower4.nbt new file mode 100644 index 0000000000000000000000000000000000000000..f7652d24124ae5d7f1f83629e84456d787ae8263 GIT binary patch literal 4006 zcmb_fX+Tox8g?mfmX7T%r8YI==vaypg)4R|o35xCnq4EIC^VTg!X+0(uhW!f+T3as z*BmBX(M-vOM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=WP?N_0jo3 zbLFz(0V$O{8$he&bkhI|frL?FSMM>ZM z?9_lnLKF#h)%N&~1=XUo-=6zEJm{LJ#I0ZUPA6q-{sgC%#Hjb~PEWDG87A=`Zn9fW zWm6*ydS=H1IrDRExuXnXN`R()6{@%go$cyjD6)Og47wqPxgsuI-%>`mq zU{GLmCpqE=`L?VTI(y}n;s^7$lar6<4JXLtPt2sGleEfJFNU=Kd=>HzDV`<@jdd>R za=PcdDor0>s?3WVh&~e-_i(&(aN}L-_(^H7@4PYb*B9&Gc0AM_i|pt(49v!zrH#Ls zDSP^7T-NWX+62_F43#w7iTf(7e{Al)L*RTBhtqEy7-tvxD7U^d+wC>;N Found edges cases that didn't return StructureInfo on Structure gens.\nFixed findUndergroundCeiling() call.\n", "1.5.0": "Expose/Add custom structure locations.\nSet Key max uses as configurable.\nAdded Chinese language file. Thanks to qyhao.\nAdded new config options - toggle default loot table and templates enforcement.\nRemoved references to mod_present condition on loot tables.\nFix WitherRoot and WitherBranch blocks placement.\nAdded meta file system.\nAdded underwater structures.\nAdded more treasure room structures.", @@ -33,7 +33,7 @@ "1.6.2": "Removed GUI config that was inadvertently added last update.", "1.6.3": "Removed debugging code that was causing underwater structures to generate too frequently.", "1.7.0": "Refactored config files into one GUI config.\nAdded Desert Wishing Well block.\nFixed Rarity enum value mappings.\nPersisted ChestRegistry.\nFixed Well generation on podzol/mycelium generating mushroom block instead of mushrooms.\nReconfigured folder locations where logging and resource files go (moved out of /mods folder.)\nUsing GottschCore v1.9.0.\n*Fixed chests not generating in some pits.\n*Fixed world properties not clearing between game world loads.\nFixed loading of ChestRegistry.\n", - "1.8.0": "Add SpawnRuins command.\nFix/enable other spawn commands.\n" + "1.8.0": "Added SpawnRuins command.\nFixed/enable other spawn commands.\n" } } From 470d74aee95f4924e836f71b2d2dd0b88907909c Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Mon, 6 Jan 2020 21:57:15 -0500 Subject: [PATCH 13/23] adding config settings for coins stack size. fix key number of uses. --- .../treasure2/command/SpawnRuinsCommand.java | 2 -- .../treasure2/config/TreasureConfig.java | 15 ++++++++++ .../treasure2/item/CoinItem.java | 7 +++-- .../treasure2/item/KeyItem.java | 19 ++++--------- .../treasure2/item/PearlItem.java | 8 +----- .../treasure2/item/TreasureItems.java | 28 +++++++++---------- 6 files changed, 40 insertions(+), 39 deletions(-) diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java index c8d64f108..dd6394a84 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java @@ -89,9 +89,7 @@ public void execute(MinecraftServer server, ICommandSender commandSender, String } // build the key String key = (Treasure.MODID + ":" + "decay/" + ruleSetName).replace("\\", "/"); - Treasure.logger.debug("ruleset key -> {}", key); ruleSet = Treasure.DECAY_MANAGER.getRuleSetMap().get(key); - Treasure.logger.debug("ruleset -> {}", ruleSet); } Rarity rarity = Rarity.values()[random.nextInt(Rarity.values().length)]; IChestConfig config = TreasureConfig.CHESTS.surfaceChests.configMap.get(rarity); diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/TreasureConfig.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/TreasureConfig.java index b486f9834..c3adcd85f 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/TreasureConfig.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/TreasureConfig.java @@ -241,6 +241,10 @@ public class TreasureConfig implements IConfig, ILoggerConfig { @Comment({"Keys and Locks properties"}) public static final KeysAndLocks KEYS_LOCKS = new KeysAndLocks(); + @Name("07b coins and valuables") + @Comment({"Coins and Valuables properties"}) + public static final Coins COINS = new Coins(); + @Name("08 gems and ores") @Comment({"Gems and Ores properties"}) public static final GemsAndOres GEMS_ORES = new GemsAndOres(); @@ -626,6 +630,17 @@ public List getBiomeTypeBlackList() { } } + /* + * + */ + public static class Coins { + @Comment("The maximum size of a coin item stack.") + @Name("01. Max Stack Size:") + @RangeInt(min = 1, max = 64) + @RequiresMcRestart + public int maxStackSize = 8; + } + /* * */ diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/CoinItem.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/CoinItem.java index e84f10d87..546e1a395 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/CoinItem.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/CoinItem.java @@ -19,6 +19,7 @@ import com.someguyssoftware.treasure2.Treasure; import com.someguyssoftware.treasure2.block.IWishingWellBlock; import com.someguyssoftware.treasure2.block.TreasureBlocks; +import com.someguyssoftware.treasure2.config.TreasureConfig; import com.someguyssoftware.treasure2.enums.Coins; import com.someguyssoftware.treasure2.enums.Rarity; @@ -39,8 +40,9 @@ * */ public class CoinItem extends ModItem { - + private static final int MAX_CUSTOM_STACK_SIZE = 64; public static final int MAX_STACK_SIZE = 8; + private Coins coin; /** @@ -49,7 +51,8 @@ public class CoinItem extends ModItem { public CoinItem (String modID, String name) { super(); this.setItemName(modID, name); - this.setMaxStackSize(MAX_STACK_SIZE); +// this.setMaxStackSize(MAX_STACK_SIZE); + this.setMaxStackSize(Math.min(MAX_CUSTOM_STACK_SIZE, TreasureConfig.COINS.maxStackSize)); this.setCreativeTab(Treasure.TREASURE_TAB); // set the coin to gold by default this.coin = Coins.GOLD; diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/KeyItem.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/KeyItem.java index 5b4a9941a..97e0819e6 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/KeyItem.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/KeyItem.java @@ -86,7 +86,7 @@ public KeyItem(String modID, String name) { setBreakable(true); setDamageable(true); setCraftable(false); - setMaxUses(DEFAULT_MAX_USES); + setMaxDamage(DEFAULT_MAX_USES); setSuccessProbability(90D); setMaxStackSize(1); // 12/3/2018: set to max 1 because keys are damaged and don't stack well. } @@ -226,7 +226,10 @@ public EnumActionResult onItemUse(EntityPlayer player, World worldIn, BlockPos p // user attempted to use key - increment the damage if (isDamageable() && !isKeyBroken) { - heldItem.damageItem(1, player); + heldItem.damageItem(1, player); + if (heldItem.getItemDamage() == heldItem.getMaxDamage()) { + heldItem.shrink(1); + } } } catch (Exception e) { @@ -359,18 +362,6 @@ public KeyItem setMaxDamage(int damage) { super.setMaxDamage(damage); return this; } - - /** - * A wrapper for setMaxDamage that corrects for 0-based index/counting. - * @param uses the uses to set - */ - public void setMaxUses(int uses) { - int damage = uses - 1; - if (damage < 0) { - damage = 0; - } - setMaxDamage(damage); - } /** * @return the successProbability diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/PearlItem.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/PearlItem.java index 9a7e617a0..f9b914e50 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/PearlItem.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/PearlItem.java @@ -5,9 +5,7 @@ import java.util.ArrayList; import java.util.List; -import java.util.Map; import java.util.Random; -import java.util.Map.Entry; import com.someguyssoftware.gottschcore.cube.Cube; import com.someguyssoftware.gottschcore.item.ModItem; @@ -18,13 +16,9 @@ import com.someguyssoftware.gottschcore.world.WorldInfo; import com.someguyssoftware.treasure2.Treasure; import com.someguyssoftware.treasure2.block.IWishingWellBlock; -import com.someguyssoftware.treasure2.block.TreasureBlocks; -import com.someguyssoftware.treasure2.enums.Coins; import com.someguyssoftware.treasure2.enums.Pearls; -import com.someguyssoftware.treasure2.enums.Rarity; import com.someguyssoftware.treasure2.loot.TreasureLootTableMaster.SpecialLootTables; -import net.minecraft.block.Block; import net.minecraft.client.util.ITooltipFlag; import net.minecraft.entity.item.EntityItem; import net.minecraft.init.Blocks; @@ -36,7 +30,7 @@ import net.minecraft.world.World; /** - * TODO implement Lombok and remove getter/setters + * * @author Mark Gottschling on Aug 18, 2019 * */ diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/TreasureItems.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/TreasureItems.java index 5bfaa4ba1..b9ad36c54 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/TreasureItems.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/item/TreasureItems.java @@ -145,81 +145,81 @@ public class TreasureItems { .setCategory(Category.BASIC) .setRarity(Rarity.COMMON) .setCraftable(false) - .setMaxUses(TreasureConfig.KEYS_LOCKS.woodKeyMaxUses); + .setMaxDamage(TreasureConfig.KEYS_LOCKS.woodKeyMaxUses); STONE_KEY = new KeyItem(Treasure.MODID, TreasureConfig.STONE_KEY_ID) .setCategory(Category.BASIC) .setRarity(Rarity.COMMON) .setCraftable(false) - .setMaxUses(TreasureConfig.KEYS_LOCKS.stoneKeyMaxUses); + .setMaxDamage(TreasureConfig.KEYS_LOCKS.stoneKeyMaxUses); IRON_KEY = new KeyItem(Treasure.MODID, TreasureConfig.IRON_KEY_ID) .setCategory(Category.METALS) .setRarity(Rarity.UNCOMMON) .setCraftable(false) - .setMaxUses(TreasureConfig.KEYS_LOCKS.ironKeyMaxUses); + .setMaxDamage(TreasureConfig.KEYS_LOCKS.ironKeyMaxUses); GOLD_KEY = new KeyItem(Treasure.MODID, TreasureConfig.GOLD_KEY_ID) .setCategory(Category.METALS) .setRarity(Rarity.SCARCE) .setCraftable(false) - .setMaxUses(TreasureConfig.KEYS_LOCKS.goldKeyMaxUses); + .setMaxDamage(TreasureConfig.KEYS_LOCKS.goldKeyMaxUses); DIAMOND_KEY = new KeyItem(Treasure.MODID, TreasureConfig.DIAMOND_KEY_ID) .setCategory(Category.GEMS) .setRarity(Rarity.RARE) .setBreakable(false) .setCraftable(false) - .setMaxUses(TreasureConfig.KEYS_LOCKS.diamondKeyMaxUses); + .setMaxDamage(TreasureConfig.KEYS_LOCKS.diamondKeyMaxUses); EMERALD_KEY = new KeyItem(Treasure.MODID, TreasureConfig.EMERALD_KEY_ID) .setCategory(Category.GEMS) .setRarity(Rarity.RARE) .setBreakable(false) .setCraftable(false) - .setMaxUses(TreasureConfig.KEYS_LOCKS.emeraldKeyMaxUses); + .setMaxDamage(TreasureConfig.KEYS_LOCKS.emeraldKeyMaxUses); RUBY_KEY = new KeyItem(Treasure.MODID, TreasureConfig.RUBY_KEY_ID) .setCategory(Category.GEMS) .setRarity(Rarity.EPIC) .setBreakable(false) .setCraftable(false) - .setMaxUses(TreasureConfig.KEYS_LOCKS.rubyKeyMaxUses); + .setMaxDamage(TreasureConfig.KEYS_LOCKS.rubyKeyMaxUses); SAPPHIRE_KEY = new KeyItem(Treasure.MODID, TreasureConfig.SAPPHIRE_KEY_ID) .setCategory(Category.GEMS) .setRarity(Rarity.EPIC) .setBreakable(false) .setCraftable(false) - .setMaxUses(TreasureConfig.KEYS_LOCKS.sapphireKeyMaxUses); + .setMaxDamage(TreasureConfig.KEYS_LOCKS.sapphireKeyMaxUses); JEWELLED_KEY = new JewelledKey(Treasure.MODID, TreasureConfig.JEWELLED_KEY_ID) .setCategory(Category.GEMS) .setRarity(Rarity.EPIC) .setBreakable(false) .setCraftable(false) - .setMaxUses(TreasureConfig.KEYS_LOCKS.jewelledKeyMaxUses); + .setMaxDamage(TreasureConfig.KEYS_LOCKS.jewelledKeyMaxUses); METALLURGISTS_KEY = new MetallurgistsKey(Treasure.MODID, TreasureConfig.METALLURGISTS_KEY_ID) .setCategory(Category.METALS) .setRarity(Rarity.RARE) .setBreakable(false) .setCraftable(false) - .setMaxUses(TreasureConfig.KEYS_LOCKS.metallurgistsKeyMaxUses); + .setMaxDamage(TreasureConfig.KEYS_LOCKS.metallurgistsKeyMaxUses); SKELETON_KEY = new SkeletonKey(Treasure.MODID, TreasureConfig.SKELETON_KEY_ID) .setCategory(Category.BASIC) .setRarity(Rarity.RARE) .setBreakable(false) .setCraftable(false) - .setMaxUses(TreasureConfig.KEYS_LOCKS.skeletonKeyMaxUses); + .setMaxDamage(TreasureConfig.KEYS_LOCKS.skeletonKeyMaxUses); SPIDER_KEY = new KeyItem(Treasure.MODID, TreasureConfig.SPIDER_KEY_ID) .setCategory(Category.MOB) .setRarity(Rarity.SCARCE) .setBreakable(true) .setCraftable(true) - .setMaxUses(TreasureConfig.KEYS_LOCKS.spiderKeyMaxUses); + .setMaxDamage(TreasureConfig.KEYS_LOCKS.spiderKeyMaxUses); WITHER_KEY = new KeyItem(Treasure.MODID, TreasureConfig.WITHER_KEY_ID) .setCategory(Category.WITHER) @@ -233,7 +233,7 @@ public class TreasureItems { .setRarity(Rarity.COMMON) .setBreakable(true) .setCraftable(true) - .setMaxUses(TreasureConfig.KEYS_LOCKS.pilferersLockPickMaxUses) + .setMaxDamage(TreasureConfig.KEYS_LOCKS.pilferersLockPickMaxUses) .setSuccessProbability(24); THIEFS_LOCK_PICK = new ThiefsLockPick(Treasure.MODID, TreasureConfig.THIEFS_LOCK_PICK_ID) @@ -241,7 +241,7 @@ public class TreasureItems { .setRarity(Rarity.UNCOMMON) .setBreakable(true) .setCraftable(true) - .setMaxUses(TreasureConfig.KEYS_LOCKS.thiefsLockPickMaxUses) + .setMaxDamage(TreasureConfig.KEYS_LOCKS.thiefsLockPickMaxUses) .setSuccessProbability(32); // KEY RING From a3057594a0656992eee805d73c02466de155a983 Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Tue, 7 Jan 2020 23:15:20 -0500 Subject: [PATCH 14/23] tweaks and fixes. --- .../generator/chest/IChestGenerator.java | 14 +++++----- .../generator/chest/WitherChestGenerator.java | 2 +- .../ruins/SubmergedRuinGenerator.java | 18 +++++-------- .../generator/ruins/SurfaceRuinGenerator.java | 27 +++++++++---------- .../worldgen/SurfaceChestWorldGenerator.java | 6 +++-- 5 files changed, 31 insertions(+), 36 deletions(-) diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/chest/IChestGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/chest/IChestGenerator.java index 9bc9e0d7b..3a5a7ec6d 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/chest/IChestGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/chest/IChestGenerator.java @@ -202,15 +202,15 @@ default public int randomizedNumberOfLocksByChestType(Random random, TreasureChe * @param random * @param coods */ - default public void addMarkers(World world, Random random, ICoords coords) { - boolean isChestOnSurface = false; + default public void addMarkers(World world, Random random, ICoords coords, final boolean isSurfaceChest) { +// boolean isChestOnSurface = false; // don't place if the block underneath is of GenericBlock ChestConfig or Container - Block block = world.getBlockState(coords.add(0, -1, 0).toPos()).getBlock(); - if(block instanceof BlockContainer || block instanceof AbstractModContainerBlock || block instanceof ITreasureBlock) { - isChestOnSurface = true; - } +// Block block = world.getBlockState(coords/*.add(0, -1, 0)*/.toPos()).getBlock(); +// if(block instanceof BlockContainer || block instanceof AbstractModContainerBlock || block instanceof ITreasureBlock) { +// isChestOnSurface = true; +// } // GenUtil.placeMarkers(world, random, coords); - if (!isChestOnSurface && TreasureConfig.WORLD_GEN.getMarkerProperties().isMarkerStructuresAllowed && + if (!isSurfaceChest && TreasureConfig.WORLD_GEN.getMarkerProperties().isMarkerStructuresAllowed && RandomHelper.checkProbability(random, TreasureConfig.WORLD_GEN.getMarkerProperties().markerStructureProbability)) { Treasure.logger.debug("generating a random structure marker -> {}", coords.toShortString()); new StructureMarkerGenerator().generate(world, random, coords); diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/chest/WitherChestGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/chest/WitherChestGenerator.java index 9c2674a7f..357ce2802 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/chest/WitherChestGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/chest/WitherChestGenerator.java @@ -90,7 +90,7 @@ public void addLocks(Random random, AbstractChestBlock chest, AbstractTreasureCh * Don't place any markers */ @Override - public void addMarkers(World world, Random random, ICoords coords) { + public void addMarkers(World world, Random random, ICoords coords, boolean isSurfaceChest) { return; } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java index 6719e4c3b..66a1e9c62 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java @@ -42,6 +42,8 @@ */ public class SubmergedRuinGenerator implements IRuinGenerator> { + private static final double REQUIRED_BASE_SIZE = 50; + /** * */ @@ -58,7 +60,6 @@ public GeneratorResult generate(World world, Random rando ICoords originalSpawnCoords, IDecayRuleSet decayRuleSet) { GeneratorResult result = new GeneratorResult<>(TemplateGeneratorData.class); - // TODO can abstract to AbstractRuinGenerator which Submerged and Ruin implement. // TODO create a method selectTemplate() in abstract that will be overridden by concrete classes, provided the archetype and type /* @@ -95,21 +96,16 @@ public GeneratorResult generate(World world, Random rando */ actualSpawnCoords = WorldInfo.getOceanFloorSurfaceCoords(world, actualSpawnCoords); Treasure.logger.debug("ocean floor coords -> {}", actualSpawnCoords.toShortString()); - - // check if it has 50% land - if (!WorldInfo.isSolidBase(world, actualSpawnCoords, 2, 2, 30)) { - Treasure.logger.debug("Coords [{}] does not meet solid base requires for {} x {}", actualSpawnCoords.toShortString(), 3, 3); - return result.fail(); - } + // check if it has % land for (int i = 0; i < 3; i++) { - if (!WorldInfo.isSolidBase(world, actualSpawnCoords, templateSize.getX(), templateSize.getZ(), 50)) { - if (i == 3) { - Treasure.logger.debug("Coords -> [{}] does not meet {}% solid base requirements for size -> {} x {}", 50, originalSpawnCoords.toShortString(), templateSize.getX(), templateSize.getY()); + if (!WorldInfo.isSolidBase(world, actualSpawnCoords, templateSize.getX(), templateSize.getZ(), REQUIRED_BASE_SIZE)) { + if (i == 2) { + Treasure.logger.debug("Coords -> [{}] does not meet {}% solid base requirements for size -> {} x {}", REQUIRED_BASE_SIZE, originalSpawnCoords.toShortString(), templateSize.getX(), templateSize.getY()); return result.fail(); } else { - originalSpawnCoords = originalSpawnCoords.add(0, -1, 0); + actualSpawnCoords = actualSpawnCoords.add(0, -1, 0); } } else { diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java index 01a98b8ce..d579e19a3 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java @@ -43,6 +43,8 @@ */ public class SurfaceRuinGenerator implements IRuinGenerator> { + private static final double REQUIRED_BASE_SIZE = 80; + /** * */ @@ -96,21 +98,16 @@ public GeneratorResult generate(World world, Random rando return result.fail(); } - // check if it has 30% land - if (!WorldInfo.isSolidBase(world, actualSpawnCoords, templateSize.getX(), templateSize.getZ(), 30)) { - Treasure.logger.debug("Coords [{}] does not meet solid base requires for {} x {}", actualSpawnCoords.toShortString(), templateSize.getX(), templateSize.getZ()); - return result.fail(); - } - - for (int i = 0; i < 3; i++) { - if (!WorldInfo.isSolidBase(world, actualSpawnCoords, templateSize.getX(), templateSize.getZ(), 50)) { - if (i == 3) { - Treasure.logger.debug("Coords -> [{}] does not meet {}% solid base requirements for size -> {} x {}", 50, originalSpawnCoords.toShortString(), templateSize.getX(), templateSize.getY()); - return result.fail(); - } - else { - originalSpawnCoords = originalSpawnCoords.add(0, -1, 0); - } + // check if it has % land base + for (int i = 0; i < 1; i++) { + if (!WorldInfo.isSolidBase(world, actualSpawnCoords, templateSize.getX(), templateSize.getZ(), REQUIRED_BASE_SIZE)) { +// if (i == 2) { +// Treasure.logger.debug("Coords -> [{}] does not meet {}% solid base requirements for size -> {} x {}", REQUIRED_BASE_SIZE, originalSpawnCoords.toShortString(), templateSize.getX(), templateSize.getY()); +// return result.fail(); +// } +// else { + actualSpawnCoords = actualSpawnCoords.add(0, -1, 0); +// } } else { continue; diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SurfaceChestWorldGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SurfaceChestWorldGenerator.java index acbac41f6..e4bc81530 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SurfaceChestWorldGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SurfaceChestWorldGenerator.java @@ -306,6 +306,7 @@ private GeneratorResult generate(World world, Random random, ICoo ICoords chestCoords = null; ICoords markerCoords = null; boolean hasMarkers = true; + boolean isSurfaceChest = false; // result to return to the caller GeneratorResult result = new GeneratorResult<>(GeneratorData.class); @@ -324,7 +325,8 @@ private GeneratorResult generate(World world, Random random, ICoo // 2. determine if above ground or below ground if (config.isSurfaceAllowed() && RandomHelper.checkProbability(random, TreasureConfig.CHESTS.surfaceChests.surfaceChestProbability)) { - + isSurfaceChest = true; + if (RandomHelper.checkProbability(random, TreasureConfig.WORLD_GEN.getGeneralProperties().surfaceStructureProbability)) { // no markers hasMarkers = false; @@ -360,7 +362,7 @@ else if (config.isSubterraneanAllowed()) { // add markers (above chest or shaft) if (hasMarkers) { - chestGenerator.addMarkers(world, random, markerCoords); + chestGenerator.addMarkers(world, random, markerCoords, isSurfaceChest); } GeneratorResult chestResult = chestGenerator.generate(world, random, chestCoords, chestRarity, genResult.getData().getChestState()); if (!chestResult.isSuccess()) { From 49eb20abb17d2ec7a32bb07fece4897a661ba4f7 Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Wed, 8 Jan 2020 07:13:13 -0500 Subject: [PATCH 15/23] removed lombok --- .../generator/ChestGeneratorData.java | 32 ++++++++++++++----- .../treasure2/generator/GeneratorData.java | 24 ++++++++------ .../treasure2/generator/GeneratorResult.java | 8 +++-- .../generator/TemplateGeneratorData.java | 21 +++++++++--- .../generator/ruins/SurfaceRuinGenerator.java | 18 +++++------ 5 files changed, 68 insertions(+), 35 deletions(-) diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ChestGeneratorData.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ChestGeneratorData.java index efba79fe8..fc4c796c7 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ChestGeneratorData.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ChestGeneratorData.java @@ -5,26 +5,42 @@ import com.someguyssoftware.gottschcore.positional.ICoords; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; import net.minecraft.block.state.IBlockState; /** * @author Mark Gottschling on Aug 21, 2019 * */ -@NoArgsConstructor -@AllArgsConstructor -@Getter -@Setter public class ChestGeneratorData extends GeneratorData { private ICoords chestCoords; private IBlockState chestState; + public ChestGeneratorData() {} + + public ChestGeneratorData(ICoords chestCoords, IBlockState chestState) { + super(); + this.chestCoords = chestCoords; + this.chestState = chestState; + } + @Override public String toString() { return "ChestGeneratorData [chestCoords=" + chestCoords + ", chestState=" + chestState + "]"; } + + public ICoords getChestCoords() { + return chestCoords; + } + + public void setChestCoords(ICoords chestCoords) { + this.chestCoords = chestCoords; + } + + public IBlockState getChestState() { + return chestState; + } + + public void setChestState(IBlockState chestState) { + this.chestState = chestState; + } } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/GeneratorData.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/GeneratorData.java index 0f962ebd6..2d438ff6a 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/GeneratorData.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/GeneratorData.java @@ -7,25 +7,31 @@ import com.someguyssoftware.gottschcore.positional.ICoords; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; - /** * @author Mark Gottschling on Aug 15, 2019 * */ -@NoArgsConstructor -@AllArgsConstructor -@Getter -@Setter public class GeneratorData implements IGeneratorData { private ICoords spawnCoords; + public GeneratorData() {} + + public GeneratorData(ICoords spawnCoords) { + super(); + this.spawnCoords = spawnCoords; + } + @Override public String toString() { return ToStringBuilder.reflectionToString(this); } + + public ICoords getSpawnCoords() { + return spawnCoords; + } + + public void setSpawnCoords(ICoords spawnCoords) { + this.spawnCoords = spawnCoords; + } } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/GeneratorResult.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/GeneratorResult.java index 4b599316d..fd0e0bbd8 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/GeneratorResult.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/GeneratorResult.java @@ -5,15 +5,12 @@ import com.someguyssoftware.treasure2.Treasure; -import lombok.Setter; - /** * @author Mark Gottschling on Aug 15, 2019 * */ public class GeneratorResult implements IGeneratorResult { private boolean success; - @Setter private DATA data; private Class dataClass; @@ -56,6 +53,11 @@ public GeneratorResult fail() { return this; } + @Override + public void setData(DATA data) { + this.data = data; + } + @Override public String toString() { return "GeneratorResult [success=" + success + ", data=" + data + ", dataClass=" + dataClass + "]"; diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/TemplateGeneratorData.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/TemplateGeneratorData.java index 4d51d462b..612992abf 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/TemplateGeneratorData.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/TemplateGeneratorData.java @@ -3,21 +3,16 @@ */ package com.someguyssoftware.treasure2.generator; -import org.apache.commons.lang3.builder.ToStringBuilder; - import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; import com.someguyssoftware.gottschcore.positional.ICoords; -import lombok.Getter; -import lombok.Setter; import net.minecraft.block.Block; /** * @author Mark Gottschling on Aug 22, 2019 * */ -@Getter @Setter public class TemplateGeneratorData extends ChestGeneratorData { /* * size of the structure represented by ICoords @@ -28,4 +23,20 @@ public class TemplateGeneratorData extends ChestGeneratorData { * map by block. this method assumes that a list of block will be provided to scan for. */ private Multimap map = ArrayListMultimap.create(); + + public ICoords getSize() { + return size; + } + + public void setSize(ICoords size) { + this.size = size; + } + + public Multimap getMap() { + return map; + } + + public void setMap(Multimap map) { + this.map = map; + } } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java index d579e19a3..fcad8bcac 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java @@ -99,15 +99,15 @@ public GeneratorResult generate(World world, Random rando } // check if it has % land base - for (int i = 0; i < 1; i++) { + for (int i = 0; i < 2; i++) { if (!WorldInfo.isSolidBase(world, actualSpawnCoords, templateSize.getX(), templateSize.getZ(), REQUIRED_BASE_SIZE)) { -// if (i == 2) { -// Treasure.logger.debug("Coords -> [{}] does not meet {}% solid base requirements for size -> {} x {}", REQUIRED_BASE_SIZE, originalSpawnCoords.toShortString(), templateSize.getX(), templateSize.getY()); -// return result.fail(); -// } -// else { + if (i == 1) { + Treasure.logger.debug("Coords -> [{}] does not meet {}% solid base requirements for size -> {} x {}", REQUIRED_BASE_SIZE, originalSpawnCoords.toShortString(), templateSize.getX(), templateSize.getY()); + return result.fail(); + } + else { actualSpawnCoords = actualSpawnCoords.add(0, -1, 0); -// } + } } else { continue; @@ -162,9 +162,7 @@ public GeneratorResult generate(World world, Random rando // interrogate info for spawners and any other special block processing (except chests that are handler by caller List spawnerCoords = (List) genResult.getData().getMap().get(GenUtil.getMarkerBlock(StructureMarkers.SPAWNER)); List proximityCoords = (List) genResult.getData().getMap().get(GenUtil.getMarkerBlock(StructureMarkers.PROXIMITY_SPAWNER)); - - // TODO these are wrong because we are adding the *new rotation calculated* spawnCoords and adding to the relative coords of the spawners - // TODO they need to be relative to the original plus the offset.... this should be accomplished when records to real-world coords + // populate vanilla spawners buildVanillaSpawners(world, random, spawnerCoords); From 05b5a660d93a30faba1e7f8503a1132449b623e0 Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Wed, 8 Jan 2020 07:20:05 -0500 Subject: [PATCH 16/23] removed lombok --- .../gen/structure/TemplateGenerator.java | 16 +++++---- .../SubmergedChestWorldGenerator.java | 28 +++++++++++++-- .../worldgen/SurfaceChestWorldGenerator.java | 36 ++++++++++++++++--- 3 files changed, 66 insertions(+), 14 deletions(-) diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java index 8fea2cdb3..02a9c3c11 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java @@ -9,7 +9,6 @@ import com.someguyssoftware.gottschcore.positional.Coords; import com.someguyssoftware.gottschcore.positional.ICoords; -import com.someguyssoftware.gottschcore.world.gen.structure.DecayProcessor; import com.someguyssoftware.gottschcore.world.gen.structure.GottschTemplate; import com.someguyssoftware.gottschcore.world.gen.structure.IDecayProcessor; import com.someguyssoftware.gottschcore.world.gen.structure.StructureMarkers; @@ -18,9 +17,7 @@ import com.someguyssoftware.treasure2.generator.GeneratorResult; import com.someguyssoftware.treasure2.generator.TemplateGeneratorData; import com.someguyssoftware.treasure2.meta.StructureMeta; -import com.sun.media.jfxmedia.logging.Logger; -import lombok.Setter; import net.minecraft.block.Block; import net.minecraft.block.properties.PropertyDirection; import net.minecraft.block.state.IBlockState; @@ -29,15 +26,15 @@ import net.minecraft.world.World; import net.minecraft.world.gen.structure.template.PlacementSettings; +// TODO getMarkerBlock should be in TemplateGenerator as well (passed in) +// TODO move TemplateGenerator to world.gen.structure (in gottschcore) +// TODO structure gen should probably pass in the replacement map + /** * - // TODO getMarkerBlock should be in TemplateGenerator as well (passed in) - // TODO move TemplateGenerator to world.gen.structure (in gottschcore) - // TODO structure gen should probably pass in the replacement map * @author Mark Gottschling on Jan 24, 2019 * */ -@Setter public class TemplateGenerator implements ITemplateGenerator> { // facing property of a vanilla chest private static final PropertyDirection VANILLA_CHEST_FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL); @@ -184,4 +181,9 @@ public Block getNullBlock() { return nullBlock; } + @Override + public void setNullBlock(Block nullBlock) { + this.nullBlock = nullBlock; + } + } \ No newline at end of file diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SubmergedChestWorldGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SubmergedChestWorldGenerator.java index be2cafab7..3e1be9c5c 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SubmergedChestWorldGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SubmergedChestWorldGenerator.java @@ -45,8 +45,6 @@ import com.someguyssoftware.treasure2.persistence.GenDataPersistence; import com.someguyssoftware.treasure2.registry.ChestRegistry; -import lombok.Getter; -import lombok.Setter; import net.minecraft.init.Biomes; import net.minecraft.world.World; import net.minecraft.world.biome.Biome; @@ -59,7 +57,6 @@ * @author Mark Gottschling on Dec 3, 2019 * */ -@Getter @Setter public class SubmergedChestWorldGenerator implements ITreasureWorldGenerator { private int chunksSinceLastChest; private Map chunksSinceLastRarityChest; @@ -358,4 +355,29 @@ public boolean isRegisteredChestWithinDistance(World world, ICoords coords, int } return false; } + + public int getChunksSinceLastChest() { + return chunksSinceLastChest; + } + + public void setChunksSinceLastChest(int chunksSinceLastChest) { + this.chunksSinceLastChest = chunksSinceLastChest; + } + + public Map getChunksSinceLastRarityChest() { + return chunksSinceLastRarityChest; + } + + public void setChunksSinceLastRarityChest(Map chunksSinceLastRarityChest) { + this.chunksSinceLastRarityChest = chunksSinceLastRarityChest; + } + + public Map> getChestCollectionGeneratorsMap() { + return chestCollectionGeneratorsMap; + } + + public void setChestCollectionGeneratorsMap( + Map> chestCollectionGeneratorsMap) { + this.chestCollectionGeneratorsMap = chestCollectionGeneratorsMap; + } } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SurfaceChestWorldGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SurfaceChestWorldGenerator.java index e4bc81530..7f52e2374 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SurfaceChestWorldGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/SurfaceChestWorldGenerator.java @@ -24,7 +24,6 @@ import com.someguyssoftware.gottschcore.random.RandomHelper; import com.someguyssoftware.gottschcore.random.RandomWeightedCollection; import com.someguyssoftware.gottschcore.world.WorldInfo; -import com.someguyssoftware.gottschcore.world.gen.structure.IDecayProcessor; import com.someguyssoftware.gottschcore.world.gen.structure.IDecayRuleSet; import com.someguyssoftware.treasure2.Treasure; import com.someguyssoftware.treasure2.biome.TreasureBiomeHelper; @@ -61,8 +60,6 @@ import com.someguyssoftware.treasure2.persistence.GenDataPersistence; import com.someguyssoftware.treasure2.registry.ChestRegistry; -import lombok.Getter; -import lombok.Setter; import net.minecraft.init.Biomes; import net.minecraft.world.World; import net.minecraft.world.biome.Biome; @@ -75,7 +72,6 @@ * @author Mark Gottschling on Jan 22, 2018 * */ -@Getter @Setter public class SurfaceChestWorldGenerator implements ITreasureWorldGenerator { protected static int UNDERGROUND_OFFSET = 5; @@ -543,4 +539,36 @@ public boolean isRegisteredChestWithinDistance(World world, ICoords coords, int } return false; } + + public int getChunksSinceLastChest() { + return chunksSinceLastChest; + } + + public void setChunksSinceLastChest(int chunksSinceLastChest) { + this.chunksSinceLastChest = chunksSinceLastChest; + } + + public Map getChunksSinceLastRarityChest() { + return chunksSinceLastRarityChest; + } + + public void setChunksSinceLastRarityChest(Map chunksSinceLastRarityChest) { + this.chunksSinceLastRarityChest = chunksSinceLastRarityChest; + } + + public Map> getChestGenMap() { + return chestGenMap; + } + + public void setChestGenMap(Map> chestGenMap) { + this.chestGenMap = chestGenMap; + } + + public static Table>> getPitGens() { + return pitGens; + } + + public static void setPitGens(Table>> pitGens) { + SurfaceChestWorldGenerator.pitGens = pitGens; + } } From 730dc3b0d0316b6d81f6c852b364a4dfc96e24d9 Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Wed, 8 Jan 2020 14:11:41 -0500 Subject: [PATCH 17/23] cleanup --- .../treasure2/block/AbstractChestBlock.java | 2 -- .../block/DesertWishingWellBlock.java | 21 +++++------------- .../treasure2/block/FogBlock.java | 4 ++-- .../treasure2/block/MimicChestBlock.java | 2 -- .../treasure2/block/OreBlock.java | 22 +++++-------------- .../treasure2/config/ChestConfig.java | 1 - .../treasure2/config/IChestConfig.java | 2 -- .../treasure2/config/IWitherTreeConfig.java | 12 ---------- .../treasure2/config/ModConfig.java | 2 -- .../treasure2/config/TreasureConfig.java | 1 - 10 files changed, 14 insertions(+), 55 deletions(-) diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/AbstractChestBlock.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/AbstractChestBlock.java index 898cec21c..55984b489 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/AbstractChestBlock.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/AbstractChestBlock.java @@ -8,7 +8,6 @@ import com.someguyssoftware.gottschcore.block.AbstractModContainerBlock; import com.someguyssoftware.gottschcore.enums.Rotate; -import com.someguyssoftware.gottschcore.positional.ICoords; import com.someguyssoftware.treasure2.Treasure; import com.someguyssoftware.treasure2.chest.ILockSlot; import com.someguyssoftware.treasure2.chest.TreasureChestType; @@ -22,7 +21,6 @@ import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.EnumBlockRenderType; diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/DesertWishingWellBlock.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/DesertWishingWellBlock.java index c2371f4ba..c4cf99cfd 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/DesertWishingWellBlock.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/DesertWishingWellBlock.java @@ -5,27 +5,18 @@ import java.util.Random; -import net.minecraft.block.Block; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.world.World; - import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import com.someguyssoftware.gottschcore.block.ModBlock; import com.someguyssoftware.treasure2.Treasure; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; + /** * @author Mark Gottschling on Sep 19, 2014 * diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/FogBlock.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/FogBlock.java index ce5cd71bd..e99992b23 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/FogBlock.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/FogBlock.java @@ -262,9 +262,9 @@ else if (((FogBlock)state.getBlock()).getFogHeight() == FogHeight.LOW_FOG) { */ private void checkFallable(World worldIn, BlockPos pos) { if ((worldIn.isAirBlock(pos.down()) || canFallThrough(worldIn.getBlockState(pos.down()))) && pos.getY() >= 0) { - int i = 32; + final int RADIUS = 32; - if (worldIn.isAreaLoaded(pos.add(-32, -32, -32), pos.add(32, 32, 32))) { + if (worldIn.isAreaLoaded(pos.add(-RADIUS, -RADIUS, -RADIUS), pos.add(RADIUS, RADIUS, RADIUS))) { if (WorldInfo.isServerSide(worldIn)) { EntityFallingBlock entityfallingblock = new EntityFallingBlock(worldIn, (double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D, worldIn.getBlockState(pos).withProperty(CHECK_DECAY,(Boolean)true).withProperty(ACTIVATED, (Boolean)false)); diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/MimicChestBlock.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/MimicChestBlock.java index 5456d6b66..046dad5b4 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/MimicChestBlock.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/MimicChestBlock.java @@ -5,7 +5,6 @@ import java.util.Random; -import com.someguyssoftware.gottschcore.enums.Direction; import com.someguyssoftware.gottschcore.world.WorldInfo; import com.someguyssoftware.treasure2.Treasure; import com.someguyssoftware.treasure2.chest.TreasureChestType; @@ -24,7 +23,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; -import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.Explosion; import net.minecraft.world.World; diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/OreBlock.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/OreBlock.java index 9ef67c374..c9e458019 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/OreBlock.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/block/OreBlock.java @@ -5,32 +5,22 @@ import java.util.Random; -import net.minecraft.block.Block; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import com.someguyssoftware.gottschcore.block.ModBlock; +import com.someguyssoftware.treasure2.Treasure; + import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; import net.minecraft.util.BlockRenderLayer; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -import com.someguyssoftware.gottschcore.block.ModBlock; -import com.someguyssoftware.treasure2.Treasure; - /** * * @author Mark Gottschling on Dec 4, 2018 diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/ChestConfig.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/ChestConfig.java index 91d4e68b2..f46b616c9 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/ChestConfig.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/ChestConfig.java @@ -6,7 +6,6 @@ import net.minecraft.world.biome.Biome; import net.minecraftforge.common.config.Config.Comment; -import net.minecraftforge.common.config.Config.Ignore; import net.minecraftforge.common.config.Config.Name; import net.minecraftforge.common.config.Config.RangeDouble; import net.minecraftforge.common.config.Config.RangeInt; diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/IChestConfig.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/IChestConfig.java index 6da6c2cf9..8b33832f8 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/IChestConfig.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/IChestConfig.java @@ -3,13 +3,11 @@ */ package com.someguyssoftware.treasure2.config; -import java.io.File; import java.util.List; import com.someguyssoftware.gottschcore.biome.BiomeTypeHolder; import net.minecraft.world.biome.Biome; -import net.minecraftforge.common.config.Configuration; /** * @author Mark Gottschling on Jan 23, 2018 diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/IWitherTreeConfig.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/IWitherTreeConfig.java index a8355d838..cd6d3a98b 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/IWitherTreeConfig.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/IWitherTreeConfig.java @@ -3,29 +3,17 @@ */ package com.someguyssoftware.treasure2.config; -import java.io.File; import java.util.List; import com.someguyssoftware.gottschcore.biome.BiomeTypeHolder; import net.minecraft.world.biome.Biome; -import net.minecraftforge.common.config.Configuration; /** * @author Mark Gottschling on Mar 25, 2018 * */ public interface IWitherTreeConfig { - /** - * Loads the Forge mod Configuration file. - * @param file - * @return the loaded Forge mod Configuration; - */ -// default public Configuration load(File file) { -// Configuration config = new Configuration(file); -// config.load(); -// return config; -// } // TODO this is common to all generator config (chest, well, tree, etc). should be intermediate interface (IRawBiomeList) between // this and IBiomesConfig OR should be part of IBiomesConfig diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/ModConfig.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/ModConfig.java index 4a526e63c..c7035dfe6 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/ModConfig.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/ModConfig.java @@ -3,8 +3,6 @@ */ package com.someguyssoftware.treasure2.config; -import com.someguyssoftware.treasure2.Treasure; - import net.minecraftforge.common.config.Config.Comment; import net.minecraftforge.common.config.Config.Name; diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/TreasureConfig.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/TreasureConfig.java index c3adcd85f..adec1226a 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/TreasureConfig.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/config/TreasureConfig.java @@ -21,7 +21,6 @@ import net.minecraftforge.common.config.Config.RangeDouble; import net.minecraftforge.common.config.Config.RangeInt; import net.minecraftforge.common.config.Config.RequiresMcRestart; -import net.minecraftforge.common.config.Config.RequiresWorldRestart; import net.minecraftforge.common.config.Config.Type; import net.minecraftforge.common.config.ConfigManager; import net.minecraftforge.common.config.Configuration; From cb572d33ed1986a32da681d8f1e09dbee158d963 Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Wed, 8 Jan 2020 14:12:37 -0500 Subject: [PATCH 18/23] changing meta.decayRuleSetName into a list. --- Treasure2-1.12.2/build.gradle | 2 +- .../ruins/SubmergedRuinGenerator.java | 16 +++++--------- .../generator/ruins/SurfaceRuinGenerator.java | 21 +++++++------------ .../treasure2/meta/StructureMeta.java | 8 ++++--- .../world/gen/structure/TemplateHolder.java | 14 +++++++++---- .../structure/TreasureTemplateManager.java | 18 +++++++++------- .../decay/treasure2/aged_ruleset.json | 1 + .../decay/treasure2/default_ruleset.json | 1 + .../decay/treasure2/ruinous_ruleset.json | 1 + .../treasure2/structures/blacksmith1.json | 2 +- .../meta/treasure2/structures/church1.json | 2 +- .../treasure2/structures/desert-tower2.json | 2 +- .../meta/treasure2/structures/house1.json | 2 +- .../meta/treasure2/structures/tower1.json | 2 +- .../meta/treasure2/structures/tower2.json | 2 +- .../meta/treasure2/structures/tower3.json | 2 +- .../meta/treasure2/structures/tower4.json | 2 +- 17 files changed, 49 insertions(+), 49 deletions(-) diff --git a/Treasure2-1.12.2/build.gradle b/Treasure2-1.12.2/build.gradle index e1475fc42..f88d625f5 100644 --- a/Treasure2-1.12.2/build.gradle +++ b/Treasure2-1.12.2/build.gradle @@ -11,7 +11,7 @@ buildscript { } plugins { - id 'io.franzbecker.gradle-lombok' version '3.1.0' +// id 'io.franzbecker.gradle-lombok' version '3.1.0' // must use gradle v3.0+ for this version of shadow (2.0.1). Update gradle-wrapper.properties id "com.github.johnrengelman.shadow" version "2.0.1" } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java index 66a1e9c62..8d7e7a5fb 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java @@ -9,32 +9,26 @@ import com.someguyssoftware.gottschcore.measurement.Quantity; import com.someguyssoftware.gottschcore.positional.Coords; import com.someguyssoftware.gottschcore.positional.ICoords; +import com.someguyssoftware.gottschcore.random.RandomHelper; import com.someguyssoftware.gottschcore.world.WorldInfo; import com.someguyssoftware.gottschcore.world.gen.structure.DecayProcessor; import com.someguyssoftware.gottschcore.world.gen.structure.IDecayProcessor; import com.someguyssoftware.gottschcore.world.gen.structure.IDecayRuleSet; import com.someguyssoftware.gottschcore.world.gen.structure.StructureMarkers; import com.someguyssoftware.treasure2.Treasure; -import com.someguyssoftware.treasure2.block.TreasureBlocks; import com.someguyssoftware.treasure2.generator.GenUtil; import com.someguyssoftware.treasure2.generator.GeneratorResult; import com.someguyssoftware.treasure2.generator.TemplateGeneratorData; import com.someguyssoftware.treasure2.meta.StructureArchetype; import com.someguyssoftware.treasure2.meta.StructureMeta; import com.someguyssoftware.treasure2.meta.StructureType; -import com.someguyssoftware.treasure2.tileentity.ProximitySpawnerTileEntity; import com.someguyssoftware.treasure2.world.gen.structure.TemplateGenerator; import com.someguyssoftware.treasure2.world.gen.structure.TemplateHolder; import net.minecraft.init.Blocks; -import net.minecraft.tileentity.TileEntityMobSpawner; -import net.minecraft.util.ResourceLocation; import net.minecraft.util.Rotation; -import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import net.minecraft.world.biome.Biome; import net.minecraft.world.gen.structure.template.PlacementSettings; -import net.minecraftforge.common.DungeonHooks; /** * @author Mark Gottschling on Aug 13, 2019 @@ -131,10 +125,10 @@ public GeneratorResult generate(World world, Random rando // setup the decay ruleset and processor IDecayProcessor decayProcessor = null; - if (decayRuleSet == null && holder.getDecayRuleSetLocation() != null) { - // create a decay processor - decayRuleSet = Treasure.DECAY_MANAGER.getRuleSetMap().get(holder.getDecayRuleSetLocation().toString()); - Treasure.logger.debug("decayRuleSet -> {}", decayRuleSet); + if (decayRuleSet == null && holder.getDecayRuleSetLocation() != null && holder.getDecayRuleSetLocation().size() > 0) { + // create a decay processor with a random rule set + decayRuleSet = Treasure.DECAY_MANAGER.getRuleSetMap().get(holder.getDecayRuleSetLocation().get(random.nextInt(holder.getDecayRuleSetLocation().size())).toString()); + Treasure.logger.debug("decayRuleSet -> {}", decayRuleSet.getName()); // if decayRuleSet is null the processor should be null } if (decayRuleSet != null) { diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java index fcad8bcac..8b42025fa 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java @@ -9,32 +9,25 @@ import com.someguyssoftware.gottschcore.measurement.Quantity; import com.someguyssoftware.gottschcore.positional.Coords; import com.someguyssoftware.gottschcore.positional.ICoords; +import com.someguyssoftware.gottschcore.random.RandomHelper; import com.someguyssoftware.gottschcore.world.WorldInfo; import com.someguyssoftware.gottschcore.world.gen.structure.DecayProcessor; import com.someguyssoftware.gottschcore.world.gen.structure.IDecayProcessor; import com.someguyssoftware.gottschcore.world.gen.structure.IDecayRuleSet; import com.someguyssoftware.gottschcore.world.gen.structure.StructureMarkers; import com.someguyssoftware.treasure2.Treasure; -import com.someguyssoftware.treasure2.block.TreasureBlocks; import com.someguyssoftware.treasure2.generator.GenUtil; import com.someguyssoftware.treasure2.generator.GeneratorResult; import com.someguyssoftware.treasure2.generator.TemplateGeneratorData; import com.someguyssoftware.treasure2.meta.StructureArchetype; import com.someguyssoftware.treasure2.meta.StructureMeta; import com.someguyssoftware.treasure2.meta.StructureType; -import com.someguyssoftware.treasure2.tileentity.ProximitySpawnerTileEntity; import com.someguyssoftware.treasure2.world.gen.structure.TemplateGenerator; import com.someguyssoftware.treasure2.world.gen.structure.TemplateHolder; -import net.minecraft.init.Blocks; -import net.minecraft.tileentity.TileEntityMobSpawner; -import net.minecraft.util.ResourceLocation; import net.minecraft.util.Rotation; -import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import net.minecraft.world.biome.Biome; import net.minecraft.world.gen.structure.template.PlacementSettings; -import net.minecraftforge.common.DungeonHooks; /** * @@ -122,9 +115,9 @@ public GeneratorResult generate(World world, Random rando // the structure to generator in the correct place originalSpawnCoords = new Coords(originalSpawnCoords.getX(), actualSpawnCoords.getY(), originalSpawnCoords.getZ()); - Treasure.logger.debug("holder.location -> {}", holder.getLocation()); - Treasure.logger.debug("holder.meta -> {}", holder.getMetaLocation()); - Treasure.logger.debug("holder.decay -> {}", holder.getDecayRuleSetLocation()); +// Treasure.logger.debug("holder.location -> {}", holder.getLocation()); +// Treasure.logger.debug("holder.meta -> {}", holder.getMetaLocation()); +// Treasure.logger.debug("holder.decay -> {}", holder.getDecayRuleSetLocation()); // NOTE don't like this here and then AGAIN in TemplateGenerator // get the rule set from the meta which is in the holder @@ -136,10 +129,10 @@ public GeneratorResult generate(World world, Random rando // setup the decay ruleset and processor IDecayProcessor decayProcessor = null; - if (decayRuleSet == null && holder.getDecayRuleSetLocation() != null) { + if (decayRuleSet == null && holder.getDecayRuleSetLocation() != null && holder.getDecayRuleSetLocation().size() > 0) { // create a decay processor - decayRuleSet = Treasure.DECAY_MANAGER.getRuleSetMap().get(holder.getDecayRuleSetLocation().toString()); - Treasure.logger.debug("decayRuleSet -> {}", decayRuleSet); + decayRuleSet = Treasure.DECAY_MANAGER.getRuleSetMap().get(holder.getDecayRuleSetLocation().get(random.nextInt(holder.getDecayRuleSetLocation().size())).toString()); + Treasure.logger.debug("decayRuleSet -> {}", decayRuleSet.getName()); // if decayRuleSet is null the processor should be null } if (decayRuleSet != null) { diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/meta/StructureMeta.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/meta/StructureMeta.java index 32934f22f..168583ad7 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/meta/StructureMeta.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/meta/StructureMeta.java @@ -3,6 +3,8 @@ */ package com.someguyssoftware.treasure2.meta; +import java.util.List; + import com.someguyssoftware.gottschcore.meta.Meta; /** @@ -13,7 +15,7 @@ public class StructureMeta extends Meta { private int verticalOffset; private boolean includeGraves; private boolean includeFog; - private String decayRuleSetName; + private List decayRuleSetName; public StructureMeta() {} @@ -52,11 +54,11 @@ public void setVerticalOffset(int verticalOffset) { this.verticalOffset = verticalOffset; } - public String getDecayRuleSetName() { + public List getDecayRuleSetName() { return decayRuleSetName; } - public void setDecayRuleSetName(String decayRuleSetName) { + public void setDecayRuleSetName(List decayRuleSetName) { this.decayRuleSetName = decayRuleSetName; } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateHolder.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateHolder.java index d8c4a61c4..0c5baa40a 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateHolder.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateHolder.java @@ -3,6 +3,9 @@ */ package com.someguyssoftware.treasure2.world.gen.structure; +import java.util.ArrayList; +import java.util.List; + import net.minecraft.util.ResourceLocation; import net.minecraft.world.gen.structure.template.Template; @@ -14,11 +17,11 @@ public class TemplateHolder { private Template template; private ResourceLocation location; private ResourceLocation metaLocation; - private ResourceLocation decayRuleSetLocation; + private List decayRuleSetLocation; public TemplateHolder() {} - public TemplateHolder(Template template, ResourceLocation location, ResourceLocation metaLocation, ResourceLocation ruleSetLocation) { + public TemplateHolder(Template template, ResourceLocation location, ResourceLocation metaLocation, List ruleSetLocation) { setTemplate(template); setLocation(metaLocation); setMetaLocation(metaLocation); @@ -63,11 +66,14 @@ public TemplateHolder setMetaLocation(ResourceLocation metaLocation) { return this; } - public ResourceLocation getDecayRuleSetLocation() { + public List getDecayRuleSetLocation() { + if (decayRuleSetLocation == null) { + decayRuleSetLocation = new ArrayList<>(); + } return decayRuleSetLocation; } - public TemplateHolder setDecayRuleSetLocation(ResourceLocation decayRuleSetLocation) { + public TemplateHolder setDecayRuleSetLocation(List decayRuleSetLocation) { this.decayRuleSetLocation = decayRuleSetLocation; return this; } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TreasureTemplateManager.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TreasureTemplateManager.java index 65ff91a93..3d7eaae68 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TreasureTemplateManager.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TreasureTemplateManager.java @@ -164,13 +164,15 @@ public void register(String modID) { // probably needs to be mapped by meta, then it can be mapped otherwise // determine if the meta decayRuleSetName is populated - ResourceLocation decayRuleSetResourceLocation = null; - if (meta.getDecayRuleSetName() != null && !meta.getDecayRuleSetName().equals("")) { - // build the key for the meta manager to look at - decayRuleSetResourceLocation = new ResourceLocation( - getMod().getId() + ":" + Treasure.DECAY_MANAGER.getBaseResourceFolder()+ "/" + modID + "/" + meta.getDecayRuleSetName() + ".json"); - String decayKey = decayRuleSetResourceLocation.toString(); - Treasure.logger.debug("Using key to find decay ruleset -> {}", decayKey); + List decayRuleSetResourceLocation = new ArrayList<>(); + if (meta.getDecayRuleSetName() != null && meta.getDecayRuleSetName().size() > 0 /*!meta.getDecayRuleSetName().equals("")*/) { + // build the keys for the meta manager to look at + for (String ruleSetName : meta.getDecayRuleSetName()) { + ResourceLocation resourceLocation = new ResourceLocation( + getMod().getId() + ":" + Treasure.DECAY_MANAGER.getBaseResourceFolder()+ "/" + modID + "/" + /*meta.getDecayRuleSetName()*/ruleSetName + ".json"); + decayRuleSetResourceLocation.add(resourceLocation); + Treasure.logger.debug("Using key to find decay ruleset -> {}", decayRuleSetResourceLocation.toString()); + } } // map according to meta archetype, type @@ -210,7 +212,7 @@ public void register(String modID) { * @param template */ private void mapToTemplatesByArchetypeBiome(ResourceLocation metaResourceLocation, - ResourceLocation location, ResourceLocation decayResourceLocation, IMetaArchetype archetype, IMetaType type, + ResourceLocation location, List decayResourceLocation, IMetaArchetype archetype, IMetaType type, Template template) { // build mapping key diff --git a/Treasure2-1.12.2/src/resources/decay/treasure2/aged_ruleset.json b/Treasure2-1.12.2/src/resources/decay/treasure2/aged_ruleset.json index 3e2d04fb3..a7bc67b11 100644 --- a/Treasure2-1.12.2/src/resources/decay/treasure2/aged_ruleset.json +++ b/Treasure2-1.12.2/src/resources/decay/treasure2/aged_ruleset.json @@ -1,4 +1,5 @@ { + "name": "aged", "verticalDecayRate":{ "min":4.0, "max":7.0 diff --git a/Treasure2-1.12.2/src/resources/decay/treasure2/default_ruleset.json b/Treasure2-1.12.2/src/resources/decay/treasure2/default_ruleset.json index 7bb4feb50..567fb03b4 100644 --- a/Treasure2-1.12.2/src/resources/decay/treasure2/default_ruleset.json +++ b/Treasure2-1.12.2/src/resources/decay/treasure2/default_ruleset.json @@ -1,4 +1,5 @@ { + "name": "default", "verticalDecayRate": { "min": 5.0, "max": 10.0 diff --git a/Treasure2-1.12.2/src/resources/decay/treasure2/ruinous_ruleset.json b/Treasure2-1.12.2/src/resources/decay/treasure2/ruinous_ruleset.json index 9aa1a723b..09014687c 100644 --- a/Treasure2-1.12.2/src/resources/decay/treasure2/ruinous_ruleset.json +++ b/Treasure2-1.12.2/src/resources/decay/treasure2/ruinous_ruleset.json @@ -1,4 +1,5 @@ { + "name": "ruinous", "verticalDecayRate": { "min": 12.0, "max": 17.0 diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/blacksmith1.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/blacksmith1.json index c9563ca59..4efb06205 100644 --- a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/blacksmith1.json +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/blacksmith1.json @@ -13,5 +13,5 @@ "y": -1, "z": 0 }, - "decayRuleSetName": "default_ruleset" + "decayRuleSetName": ["default_ruleset", "aged_ruleset", "ruinous_ruleset"] } \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/church1.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/church1.json index a0b2b3990..68f48b9a8 100644 --- a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/church1.json +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/church1.json @@ -13,5 +13,5 @@ "y": -1, "z": 0 }, - "decayRuleSetName": "default_ruleset" + "decayRuleSetName": ["default_ruleset", "aged_ruleset", "ruinous_ruleset"] } \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/desert-tower2.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/desert-tower2.json index 5557911cf..dfcfa840c 100644 --- a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/desert-tower2.json +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/desert-tower2.json @@ -8,5 +8,5 @@ "rarities": ["common"], "biomeWhiteList": ["desert"], "biomeBlackList": [], - "decayRuleSetName": "default_ruleset" + "decayRuleSetName": ["default_ruleset", "aged_ruleset", "ruinous_ruleset"] } \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/house1.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/house1.json index 27f500769..5d93ec472 100644 --- a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/house1.json +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/house1.json @@ -13,5 +13,5 @@ "y": -1, "z": 0 }, - "decayRuleSetName": "default_ruleset" + "decayRuleSetName": ["default_ruleset", "aged_ruleset", "ruinous_ruleset"] } \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower1.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower1.json index 07f3a9faa..35747cd34 100644 --- a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower1.json +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower1.json @@ -8,5 +8,5 @@ "rarities": ["common"], "biomeWhiteList": [], "biomeBlackList": [], - "decayRuleSetName": "default_ruleset" + "decayRuleSetName": ["default_ruleset", "aged_ruleset", "ruinous_ruleset"] } \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower2.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower2.json index bf72527ff..a6716f056 100644 --- a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower2.json +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower2.json @@ -8,5 +8,5 @@ "rarities": ["common"], "biomeWhiteList": [], "biomeBlackList": [], - "decayRuleSetName": "default_ruleset" + "decayRuleSetName": ["default_ruleset", "aged_ruleset", "ruinous_ruleset"] } \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower3.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower3.json index eb065ae89..94ea5b450 100644 --- a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower3.json +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower3.json @@ -13,5 +13,5 @@ "y": -1, "z": 0 }, - "decayRuleSetName": "default_ruleset" + "decayRuleSetName": ["default_ruleset", "aged_ruleset", "ruinous_ruleset"] } \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower4.json b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower4.json index 7d96da008..680aa872e 100644 --- a/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower4.json +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower4.json @@ -13,5 +13,5 @@ "y": -1, "z": 0 }, - "decayRuleSetName": "default_ruleset" + "decayRuleSetName": ["default_ruleset", "aged_ruleset", "ruinous_ruleset"] } \ No newline at end of file From 831f66b47a371af0d410ecb5a8cb481bf9e414f8 Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Fri, 10 Jan 2020 00:18:38 -0500 Subject: [PATCH 19/23] updating to use the saved state of marker blocks --- .../treasure2/command/SpawnRuinsCommand.java | 21 +++++++++- .../treasure2/generator/GenUtil.java | 9 ++++- .../generator/chest/IChestGenerator.java | 2 +- .../gen/structure/TemplateGenerator.java | 38 +++++++++++++------ 4 files changed, 54 insertions(+), 16 deletions(-) diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java index dd6394a84..0cf922dbb 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java @@ -12,12 +12,17 @@ import com.someguyssoftware.gottschcore.positional.Coords; import com.someguyssoftware.gottschcore.positional.ICoords; +import com.someguyssoftware.gottschcore.world.WorldInfo; import com.someguyssoftware.gottschcore.world.gen.structure.IDecayRuleSet; import com.someguyssoftware.treasure2.Treasure; import com.someguyssoftware.treasure2.config.IChestConfig; import com.someguyssoftware.treasure2.config.TreasureConfig; import com.someguyssoftware.treasure2.enums.Rarity; import com.someguyssoftware.treasure2.enums.WorldGenerators; +import com.someguyssoftware.treasure2.generator.ChestGeneratorData; +import com.someguyssoftware.treasure2.generator.GeneratorResult; +import com.someguyssoftware.treasure2.generator.chest.IChestGenerator; +import com.someguyssoftware.treasure2.worldgen.ITreasureWorldGenerator; import com.someguyssoftware.treasure2.worldgen.SurfaceChestWorldGenerator; import net.minecraft.command.CommandBase; @@ -94,8 +99,22 @@ public void execute(MinecraftServer server, ICommandSender commandSender, String Rarity rarity = Rarity.values()[random.nextInt(Rarity.values().length)]; IChestConfig config = TreasureConfig.CHESTS.surfaceChests.configMap.get(rarity); // generate - worldGen.generateSurfaceRuins(world, random,coords, ruleSet, config); + GeneratorResult result = worldGen.generateSurfaceRuins(world, random,coords, ruleSet, config); + Treasure.logger.debug("result from t2-ruins -> {}", result); + if (result.isSuccess() && result.getData().getChestCoords() != null) { + IChestGenerator chestGen = worldGen.getChestGenMap().get(rarity).next(); + IChestConfig chestConfig = TreasureConfig.CHESTS.surfaceChests.configMap.get(rarity); + ICoords chestCoords = result.getData().getChestCoords(); + Treasure.logger.debug("chestCoords -> {}", chestCoords); + // move the chest coords to the first dry land beneath it. + chestCoords = WorldInfo.getDryLandSurfaceCoords(world, chestCoords); + if (chestCoords == WorldInfo.EMPTY_COORDS) chestCoords = null; + + if (chestCoords != null) { + GeneratorResult chestResult = chestGen.generate(world, random, chestCoords, rarity, result.getData().getChestState()); + } } + } catch(Exception e) { Treasure.logger.error("Error generating Treasure! ruins:", e); } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/GenUtil.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/GenUtil.java index 6379421b7..745bac25f 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/GenUtil.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/GenUtil.java @@ -128,14 +128,14 @@ public static boolean replaceBlockWithChest(World world, Random random, Block ch IBlockState oldState = world.getBlockState(coords.toPos()); if (oldState.getProperties().containsKey(FACING)) { - Treasure.logger.debug("World ChestConfig marker has FACING property:" + oldState.getValue(FACING)); + Treasure.logger.debug("World Chest marker has FACING property:" + oldState.getValue(FACING)); // set the new state return placeChest(world, chest, coords, (EnumFacing)oldState.getValue(FACING)); // world.setBlockState(pos, this.getChest().getDefaultState().withProperty(FACING, oldState.getValue(FACING)), 3); } else { - Treasure.logger.debug("World ChestConfig marker does NOT have a FACING property."); + Treasure.logger.debug("World Chest marker does NOT have a FACING property."); // world.setBlockState(chestCoords.toBlockPos(), this.getChest().getDefaultState(), 3); return placeChest(world, chest, coords, EnumFacing.HORIZONTALS[random.nextInt(EnumFacing.HORIZONTALS.length)]); } @@ -152,14 +152,17 @@ public static boolean replaceBlockWithChest(World world, Random random, Block ch */ public static boolean replaceBlockWithChest(World world, Random random, ICoords coords, Block chest, IBlockState state) { if (state.getProperties().containsKey(FACING)) { + Treasure.logger.debug("Given marker state has FACING property -> {}", state.getValue(FACING)); return placeChest(world, chest, coords, (EnumFacing)state.getValue(FACING)); } if (state.getBlock() == Blocks.CHEST) { + Treasure.logger.debug("Given marker state is a vanilla chest."); EnumFacing facing = (EnumFacing)state.getValue(BlockChest.FACING); return placeChest(world, chest, coords, facing); } + Treasure.logger.debug("Given marker state neither has FACING nor is a vanilla chest."); // else do generic return replaceBlockWithChest(world, random, chest, coords); } @@ -174,6 +177,7 @@ public static boolean replaceBlockWithChest(World world, Random random, ICoords public static boolean placeChest(World world, Block chest, ICoords coords, EnumFacing facing) { // check if spawn pos is valid if (!WorldInfo.isValidY(coords)) { + Treasure.logger.debug("Cannot place chest due to invalid y pos -> {}", coords.toShortString()); return false; } @@ -182,6 +186,7 @@ public static boolean placeChest(World world, Block chest, ICoords coords, EnumF // create and place the chest //world.setBlockState(pos, chest.getStateFromMeta(meta), 3); world.setBlockState(pos,chest.getDefaultState().withProperty(FACING, facing), 3); + Treasure.logger.debug("placed chest -> {} into world at coords -> {} with prop -> {}", chest.getClass().getSimpleName(), coords.toShortString(), facing); //world.setBlockMetadataWithNotify(coords.getX(), coords.getY(), coords.getZ(), meta, 3); // get the direction the block is facing. diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/chest/IChestGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/chest/IChestGenerator.java index 3a5a7ec6d..7e7e9a96a 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/chest/IChestGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/chest/IChestGenerator.java @@ -268,7 +268,7 @@ default public TileEntity placeInWorld(World world, Random random, AbstractChest default public TileEntity placeInWorld(World world, Random random, ICoords chestCoords, AbstractChestBlock chest, IBlockState state) { // replace block @ coords boolean isPlaced = GenUtil.replaceBlockWithChest(world, random, chestCoords, chest, state); - +Treasure.logger.debug("isPlaced -> {}", isPlaced); // get the backing tile entity of the chest TileEntity te = (TileEntity) world.getTileEntity(chestCoords.toPos()); diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java index 02a9c3c11..8355e264c 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java @@ -11,15 +11,21 @@ import com.someguyssoftware.gottschcore.positional.ICoords; import com.someguyssoftware.gottschcore.world.gen.structure.GottschTemplate; import com.someguyssoftware.gottschcore.world.gen.structure.IDecayProcessor; +import com.someguyssoftware.gottschcore.world.gen.structure.StructureMarkerContext; import com.someguyssoftware.gottschcore.world.gen.structure.StructureMarkers; import com.someguyssoftware.treasure2.Treasure; +import com.someguyssoftware.treasure2.block.TreasureBlocks; +import com.someguyssoftware.treasure2.block.TreasureChestBlock; import com.someguyssoftware.treasure2.generator.GenUtil; import com.someguyssoftware.treasure2.generator.GeneratorResult; import com.someguyssoftware.treasure2.generator.TemplateGeneratorData; import com.someguyssoftware.treasure2.meta.StructureMeta; import net.minecraft.block.Block; +import net.minecraft.block.BlockHorizontal; +import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyDirection; +import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.state.IBlockState; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; @@ -37,7 +43,8 @@ */ public class TemplateGenerator implements ITemplateGenerator> { // facing property of a vanilla chest - private static final PropertyDirection VANILLA_CHEST_FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL); + private static final PropertyDirection FACING = BlockHorizontal.FACING; + private static final PropertyEnum CHEST_FACING = PropertyDirection.create("facing", EnumFacing.class); private Block nullBlock; @@ -101,29 +108,36 @@ public GeneratorResult generate(World world, Random rando } // process all markers and adding them to the result data (absolute positioned) - for (Entry entry : template.getMap().entries()) { - ICoords c = new Coords(GottschTemplate.transformedCoords(placement, entry.getValue())); + for (Entry entry : template.getMarkerMap().entries()) { + ICoords c = new Coords(GottschTemplate.transformedCoords(placement, entry.getValue().getCoords())); c = spawnCoords.add(c); result.getData().getMap().put(entry.getKey(), c); Treasure.logger.debug("adding to structure info absoluted transformed coords -> {} : {}", entry.getKey().getLocalizedName(), c.toShortString()); } // find the chest and update chest coords (absolute positioned) - List chestCoordsList = (List) result.getData().getMap().get(GenUtil.getMarkerBlock(StructureMarkers.CHEST)); - if (!chestCoordsList.isEmpty()) { - ICoords chestCoords = chestCoordsList.get(0); - result.getData().setChestCoords(chestCoords); + List contextList = (List) template.getMarkerMap().get(GenUtil.getMarkerBlock(StructureMarkers.CHEST)); + if (!contextList.isEmpty()) { + StructureMarkerContext context = contextList.get(0); + ICoords chestCoords = new Coords(GottschTemplate.transformedCoords(placement, context.getCoords())); + // get the absolute coords of chest + chestCoords = spawnCoords.add(chestCoords); + // set the chest coords in the result data + result.getData().setChestCoords(chestCoords); // get the block state of the chest - IBlockState chestState = world.getBlockState(chestCoords.toPos()); - if (chestState.getProperties().containsKey(VANILLA_CHEST_FACING)) { - result.getData().setChestState(chestState); - Treasure.logger.debug("saving chest state -> {}", chestState.toString()); + IBlockState chestState = context.getState(); + chestState = chestState.withMirror(placement.getMirror()); + chestState = chestState.withRotation(placement.getRotation()); + if (chestState.getProperties().containsKey(FACING)) { + IBlockState modState= TreasureBlocks.WOOD_CHEST.getDefaultState().withProperty(CHEST_FACING, (EnumFacing)chestState.getProperties().get(FACING)); + result.getData().setChestState(modState); +// Treasure.logger.debug("saving chest state -> {}", modState.toString()); } } // get the transformed size BlockPos transformedSize = template.transformedSize(placement.getRotation()); - Treasure.logger.debug("transformed size -> {}", transformedSize.toString()); +// Treasure.logger.debug("transformed size -> {}", transformedSize.toString()); // calculate the new spawn coords - that includes the rotation, and negates the Y offset spawnCoords = getTransformedSpawnCoords(spawnCoords, new Coords(transformedSize), placement).add(0, -offset, 0); From 32e1267a90f3a3d459dc22714f9ea9209db19753 Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Fri, 10 Jan 2020 19:58:24 -0500 Subject: [PATCH 20/23] add more credits to the mcmod.info file. --- Treasure2-1.12.2/src/resources/mcmod.info | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Treasure2-1.12.2/src/resources/mcmod.info b/Treasure2-1.12.2/src/resources/mcmod.info index 05e977d49..f9e572544 100644 --- a/Treasure2-1.12.2/src/resources/mcmod.info +++ b/Treasure2-1.12.2/src/resources/mcmod.info @@ -8,7 +8,10 @@ "url": "", "updateUrl": "", "authorList":["gottsch"], - "credits": "My son, Mason, for inspiration and ideas. CuddleBeak, for some Keys and Locks textures.", + "credits": ["My son, Mason, for inspiration and ideas.", + "CuddleBeak, for some Keys and Locks textures.", + "mn_ti for Chinese and to DarkKnightComes for Polish translation.", + "Mythical Sausage for tutorials on house/tower designs."], "logoFile": "", "screenshots": [], "dependencies": [] From e34d92cee36db524b26cd06247a22a637035ff43 Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Sat, 11 Jan 2020 21:32:57 -0500 Subject: [PATCH 21/23] add Russian translation --- .../someguyssoftware/treasure2/Treasure.java | 3 +- .../assets/treasure2/lang/ru_RU.lang | 197 ++++++++++++++++++ Treasure2-1.12.2/src/resources/mcmod.info | 5 +- 3 files changed, 200 insertions(+), 5 deletions(-) create mode 100644 Treasure2-1.12.2/src/resources/assets/treasure2/lang/ru_RU.lang diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java index e16093718..3578e07af 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java @@ -83,7 +83,8 @@ "Credits to Mason Gottschling for ideas and debugging.", "Credits to CuddleBeak for some Keys and Locks textures.", "Credits to mn_ti for Chinese and to DarkKnightComes for Polish translation.", - "Credits to Mythical Sausage for tutorials on house/tower designs." + "Credits to Mythical Sausage for tutorials on house/tower designs.", + "Credits to DarvinSlav for Russian translation." }) public class Treasure extends AbstractMod { diff --git a/Treasure2-1.12.2/src/resources/assets/treasure2/lang/ru_RU.lang b/Treasure2-1.12.2/src/resources/assets/treasure2/lang/ru_RU.lang new file mode 100644 index 000000000..b9d9f6092 --- /dev/null +++ b/Treasure2-1.12.2/src/resources/assets/treasure2/lang/ru_RU.lang @@ -0,0 +1,197 @@ +#chests +tile.treasure2:wood_chest.name=Деревянный сундук +tile.treasure2:crate_chest.name=Ящик +tile.treasure2:crate_chest_moldy.name=Заплесневелый ящик +tile.treasure2:ironbound_chest.name=Железный сундук +tile.treasure2:iron_strongbox.name=Железный сейф +tile.treasure2:gold_strongbox.name=Золотой сейф +tile.treasure2:pirate_chest.name=Пиратский сундук +tile.treasure2:safe.name=Сейф +tile.treasure2:dread_pirate_chest.name=Сундук ужаса +tile.treasure2:compressor_chest.name=Уплотненный сундук +tile.treasure2:wither_chest.name=Усопший сундук +tile.treasure2:skull_chest.name=Сундук черепа +tile.treasure2:gold_skull_chest.name=Золотой сундук черепа +tile.treasure2:cauldron_chest.name=Котлообразный сундук +tile.treasure2:oyster_chest.name=Устрица +tile.treasure2:clam_chest.name=Моллюск + +tile.treasure2:wood_mimic.name=Древесный Мимик + +#wells +tile.treasure2:wishing_well_block.name=Камень желаний +tile.treasure2:desert_wishing_well_block.name=Пустынный камень желаний + +#gravestones +tile.treasure2:gravestone1_stone.name=Каменное надгробие +tile.treasure2:gravestone1_cobblestone.name=Булыжниковое надгробие +tile.treasure2:gravestone1_mossy_cobblestone.name=Заросшее булыжниковое надгробие +tile.treasure2:gravestone1_polished_granite.name=Гранитное надгробие +tile.treasure2:gravestone1_polished_andesite.name=Андезитовое надгробие +tile.treasure2:gravestone1_polished_diorite.name=Диоритовое надгробие +tile.treasure2:gravestone1_obsidian.name=Обсидиановое надгробие + +tile.treasure2:gravestone2_stone.name=Каменное надгробие +tile.treasure2:gravestone2_cobblestone.name=Булыжниковое надгробие +tile.treasure2:gravestone2_mossy_cobblestone.name=Заросшее булыжниковое надгробие +tile.treasure2:gravestone2_polished_granite.name=Гранитное надгробие +tile.treasure2:gravestone2_polished_andesite.name=Андезитовое надгробие +tile.treasure2:gravestone2_polished_diorite.name=Диоритовое надгробие +tile.treasure2:gravestone2_obsidian.name=Обсидиановое надгробие + +tile.treasure2:gravestone3_stone.name=Каменное надгробие +tile.treasure2:gravestone3_cobblestone.name=Булыжниковое надгробие +tile.treasure2:gravestone3_mossy_cobblestone.name=Заросшее булыжниковое надгробие +tile.treasure2:gravestone3_polished_granite.name=Гранитное надгробие +tile.treasure2:gravestone3_polished_andesite.name=Андезитовое надгробие +tile.treasure2:gravestone3_polished_diorite.name=Диоритовое надгробие +tile.treasure2:gravestone3_obsidian.name=Обсидиановое надгробие + +tile.treasure2:skull_and_crossbones.name=Череп и кости +tile.treasure2:skeleton.name=Скелет + +#wither tree +tile.treasure2:wither_log.name=Засохшее бревно +tile.treasure2:wither_broken_log.name=Засохшее треснувшее бревно +tile.treasure2:wither_log_soul.name=Засохшее бревно душ +tile.treasure2:wither_branch.name=Засохшая ветвь +tile.treasure2:wither_root.name=Засохший корень +tile.treasure2:wither_planks.name=Засохшие доски + +#fogs +tile.treasure2:fog.name=Туман +tile.treasure2:high_fog.name=Густой туман +tile.treasure2:med_fog.name=Средний туман +tile.treasure2:low_fog.name=Слабый туман + +tile.treasure2:wither_fog.name=Увядший туман +tile.treasure2:high_wither_fog.name=Густой увядший туман +tile.treasure2:med_wither_fog.name=Средний увядший туман +tile.treasure2:low_wither_fog.name=Слабый увядший туман + +tile.treasure2:poison_fog.name=Ядовитый туман +tile.treasure2:high_poison_fog.name=Густой ядовитый туман +tile.treasure2:med_poison_fog.name=Средний ядовитый туман +tile.treasure2:low_poison_fog.name=Слабый ядовитый туман + +#ores +tile.treasure2:sapphire_ore.name=Сапфировая руда +tile.treasure2:ruby_ore.name=Рубиновая руда + +#other +tile.treasure2:spanish_moss.name=Испанский мох + +#items +item.treasure2:gold_coin.name=Золотая монета +item.treasure2:silver_coin.name=Серебряная монета + +item.treasure2:key_ring.name=Брелок для Ключей +item.treasure2:wood_key.name=Деревянный Ключ +item.treasure2:stone_key.name=Каменный Ключ +item.treasure2:iron_key.name=Железный Ключ +item.treasure2:gold_key.name=Золотой Ключ +item.treasure2:diamond_key.name=Алмазный Ключ +item.treasure2:emerald_key.name=Изумрудный Ключ +item.treasure2:ruby_key.name=Рубиновый Ключ +item.treasure2:sapphire_key.name=Сапфировый Ключ +item.treasure2:jewelled_key.name=Драгоценный Ключ +item.treasure2:metallurgists_key.name=Ключ Металлурга +item.treasure2:skeleton_key.name=Скелетный Ключ +item.treasure2:spider_key.name=Паучий Ключ +item.treasure2:wither_key.name=Усопший Ключ +item.treasure2:shucking_knife.name=Нож + +item.treasure2:wood_lock.name=Деревянный замок +item.treasure2:stone_lock.name=Каменный замок +item.treasure2:iron_lock.name=Железный замок +item.treasure2:gold_lock.name=Золотой замок +item.treasure2:diamond_lock.name=Алмазный замок +item.treasure2:emerald_lock.name=Изумрудный замок +item.treasure2:ruby_lock.name=Рубиновый замок +item.treasure2:sapphire_lock.name=Сапфировый замок +item.treasure2:spider_lock.name=Паучий замок +item.treasure2:wither_lock.name=Усопший замок + +item.treasure2:wither_stick_item.name=Увядшая ветвь +item.treasure2:wither_root_item.name=Увядший корень +item.treasure2:pilferers_lock_pick.name=Отмычка +item.treasure2:thiefs_lock_pick.name=Отмычка вора + +item.treasure2:painting_blocks_bricks.name=Кирпичи от o2xygeno +item.treasure2:painting_blocks_cobblestone.name=Булыжник от o2xygeno +item.treasure2:painting_blocks_dirt.name=Грязь от o2xygeno +item.treasure2:painting_blocks_lava.name=Лава от o2xygeno +item.treasure2:painting_blocks_sand.name=Песок от o2xygeno +item.treasure2:painting_blocks_water.name=Вода от o2xygeno +item.treasure2:painting_blocks_wood.name=Дерево от o2xygeno + +item.treasure2:eye_patch.name=Повязка на глаз +item.treasure2:skull_sword.name=Меч Черепа +item.treasure2:spanish_moss.name=Испанский мох +item.treasure2:sapphire.name=Сапфир +item.treasure2:ruby.name=Рубин +item.treasure2:skeleton.name=Скелет +item.treasure2:white_pearl.name=Белая жемчужина +item.treasure2:black_pearl.name=Черная жемчужина +item.treasure2:oyster_meat.name=Мясо устриц +item.treasure2:oyster_stew.name=Рагу из устриц +item.treasure2:clam_meat.name=Мясо моллюска +item.treasure2:clam_stew.name=Рагу из моллюсков +item.treasure2:treasure_tool.name=Сокровищный Инструмент + +#entities +#TODO rename standard to wood +entity.wood_mimic.name=Древесный Мимик + +#groups +itemGroup.treasure2:treasure_tab=Treasure2! + +# string resources +tooltip.yes=Да +tooltip.no=Нет +tooltip.label.rarity=Редкость: %s +tooltip.label.category=Категория: %s +tooltip.label.max_uses=Макс. использований: %s +tooltip.label.breakable=Хрупкость: %s +tooltip.label.craftable=Крафт: %s +tooltip.label.damageable=Повреждения: %s +tooltip.label.specials=Особенность: %s +tooltip.label.accepts_keys=Принимает ключи: %s +tooltip.label.coin=Брось в колодец желаний +tooltip.label.key_ring=Контейнер для ключей +tooltip.label.treasure_tool=Требуется для рецептов ключей и др. + +tooltip.label.max_locks=Макс. замков: %s +tooltip.label.container_size=Размер инвентаря: %s + + +tooltip.metallurgists_key.specials=Открывает любой замок в категории МЕТАЛЛЫ +tooltip.skeleton_key.specials=Открывает ОБЫЧНЫЙ, НЕОБЫЧНЫЙ, ДЕФИЦИТНЫЙ и РЕДКИЙ замки (исключение Усопшие) +tooltip.pilferers_lock_pick.specials=Открывает ОБЫЧНЫЙ (%s%%) и НЕОБЫЧНЫЙ (%s%%) замки +tooltip.thiefs_lock_pick.specials=Открывает ОБЫЧНЫЙ (%s%%), НЕОБЫЧНЫЙ (%s%%) и ДЕФИЦИТНЫЙ (%s%%) замки +tooltip.jewelled_key.specials=Открывает любой замок в категории ДРАГОЦЕННОСТИ + +tooltip.painting.name=%s +tooltip.painting.collection=Коллекция: %s +tooltip.painting.issue=Выпуск: %s/%s +tooltip.painting.artist=от %s + + +#gui +display.wood_chest.name=Деревянный сундук +display.crate_chest.name=Ящик +display.crate_chest_moldy.name=Заплесневелый ящик +display.ironbound_chest.name=Железный сундук +display.pirate_chest.name=Пиратский сундук +display.iron_strongbox.name=Железный сейф +display.gold_strongbox.name=Золотой сейф +display.safe.name=Сейф +display.dread_pirate_chest.name=Сундук ужаса +display.compressor_chest.name=Уплотненный сундук +display.wither_chest.name=Усопший сундук +display.skull_chest.name=Сундук черепа +display.gold_skull_chest.name=Золотой сундук черепа +display.cauldron_chest.name=Котлообразный сундук +display.whale_bone_pirate_chest.name=Китовый скелетный пиратский сундук +display.clam_chest.name=Моллюск +display.oyster_chest.name=Устрица \ No newline at end of file diff --git a/Treasure2-1.12.2/src/resources/mcmod.info b/Treasure2-1.12.2/src/resources/mcmod.info index f9e572544..9ac25f1b2 100644 --- a/Treasure2-1.12.2/src/resources/mcmod.info +++ b/Treasure2-1.12.2/src/resources/mcmod.info @@ -8,10 +8,7 @@ "url": "", "updateUrl": "", "authorList":["gottsch"], - "credits": ["My son, Mason, for inspiration and ideas.", - "CuddleBeak, for some Keys and Locks textures.", - "mn_ti for Chinese and to DarkKnightComes for Polish translation.", - "Mythical Sausage for tutorials on house/tower designs."], + "credits": "My son, Mason, for inspiration and ideas. CuddleBeak, for some Keys and Locks textures. mn_ti for Chinese and to DarkKnightComes for Polish translation. Mythical Sausage for tutorials on house/tower designs. DarvinSlav for Russian translation.", "logoFile": "", "screenshots": [], "dependencies": [] From 9acd42866204b9f029bb5af2bec9077b312c41ae Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Sat, 11 Jan 2020 21:33:27 -0500 Subject: [PATCH 22/23] Fix solid base checkin Submerged and Surface Ruin Generators --- .../ruins/SubmergedRuinGenerator.java | 2 +- .../generator/ruins/SurfaceRuinGenerator.java | 27 ++++++++++++------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java index 8d7e7a5fb..bb4e3244b 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SubmergedRuinGenerator.java @@ -103,7 +103,7 @@ public GeneratorResult generate(World world, Random rando } } else { - continue; + break; } } diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java index 8b42025fa..d8811ed5e 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java @@ -37,6 +37,7 @@ public class SurfaceRuinGenerator implements IRuinGenerator> { private static final double REQUIRED_BASE_SIZE = 80; + private static final double REQUIRED_AIR_SIZE = 60; /** * @@ -92,21 +93,31 @@ public GeneratorResult generate(World world, Random rando } // check if it has % land base - for (int i = 0; i < 2; i++) { + for (int i = 0; i < 3; i++) { + Treasure.logger.debug("finding solid base index -> {} at coords -> {}", i, actualSpawnCoords.toShortString()); if (!WorldInfo.isSolidBase(world, actualSpawnCoords, templateSize.getX(), templateSize.getZ(), REQUIRED_BASE_SIZE)) { - if (i == 1) { - Treasure.logger.debug("Coords -> [{}] does not meet {}% solid base requirements for size -> {} x {}", REQUIRED_BASE_SIZE, originalSpawnCoords.toShortString(), templateSize.getX(), templateSize.getY()); + if (i == 2) { + Treasure.logger.debug("Coords -> [{}] does not meet {}% solid base requirements for size -> {} x {}", originalSpawnCoords.toShortString(), REQUIRED_BASE_SIZE, templateSize.getX(), templateSize.getZ()); return result.fail(); } else { actualSpawnCoords = actualSpawnCoords.add(0, -1, 0); + Treasure.logger.debug("move actual spawn coords down for solid base check -> {}", actualSpawnCoords.toShortString()); } } else { - continue; + break; } } - + Treasure.logger.debug("using solid base coords -> {}", actualSpawnCoords.toShortString()); + + // check if the plane above the actual spawn coords is % air + Treasure.logger.debug("checking for {} % air at coords -> {} for dimensions -> {} x {}", REQUIRED_AIR_SIZE, actualSpawnCoords.add(0, 1, 0), templateSize.getX(), templateSize.getZ()); + if (!WorldInfo.isAirBase(world, actualSpawnCoords.add(0, 1, 0), templateSize.getX(), templateSize.getZ(), REQUIRED_AIR_SIZE)) { + Treasure.logger.debug("Coords -> [{}] does not meet {} % air base requirements for size -> {} x {}", originalSpawnCoords.toShortString(), REQUIRED_AIR_SIZE, templateSize.getX(), templateSize.getZ()); + return result.fail(); + } + /** * Build */ @@ -114,11 +125,7 @@ public GeneratorResult generate(World world, Random rando // this is the coords that need to be supplied to the template generator to allow // the structure to generator in the correct place originalSpawnCoords = new Coords(originalSpawnCoords.getX(), actualSpawnCoords.getY(), originalSpawnCoords.getZ()); - -// Treasure.logger.debug("holder.location -> {}", holder.getLocation()); -// Treasure.logger.debug("holder.meta -> {}", holder.getMetaLocation()); -// Treasure.logger.debug("holder.decay -> {}", holder.getDecayRuleSetLocation()); - + // NOTE don't like this here and then AGAIN in TemplateGenerator // get the rule set from the meta which is in the holder StructureMeta meta = (StructureMeta) Treasure.META_MANAGER.getMetaMap().get(holder.getMetaLocation().toString()); From 575f38cf1c25782195efa0370166724a7792b28b Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Sat, 11 Jan 2020 22:58:27 -0500 Subject: [PATCH 23/23] Updates. --- .../src/com/someguyssoftware/treasure2/Treasure.java | 2 +- Treasure2-1.12.2/src/resources/mcmod.info | 2 +- Treasure2-1.12.2/update.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java index 3578e07af..d2fbec7a8 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java @@ -84,7 +84,7 @@ "Credits to CuddleBeak for some Keys and Locks textures.", "Credits to mn_ti for Chinese and to DarkKnightComes for Polish translation.", "Credits to Mythical Sausage for tutorials on house/tower designs.", - "Credits to DarvinSlav for Russian translation." + "Credits to OdinsRagnarok for Spanish translation and DarvinSlav for Russian translation." }) public class Treasure extends AbstractMod { diff --git a/Treasure2-1.12.2/src/resources/mcmod.info b/Treasure2-1.12.2/src/resources/mcmod.info index 9ac25f1b2..1f188d73b 100644 --- a/Treasure2-1.12.2/src/resources/mcmod.info +++ b/Treasure2-1.12.2/src/resources/mcmod.info @@ -8,7 +8,7 @@ "url": "", "updateUrl": "", "authorList":["gottsch"], - "credits": "My son, Mason, for inspiration and ideas. CuddleBeak, for some Keys and Locks textures. mn_ti for Chinese and to DarkKnightComes for Polish translation. Mythical Sausage for tutorials on house/tower designs. DarvinSlav for Russian translation.", + "credits": "My son, Mason, for inspiration and ideas. CuddleBeak, for some Keys and Locks textures. mn_ti for Chinese and to DarkKnightComes for Polish translation. Mythical Sausage for tutorials on house/tower designs. OdinsRagnarok for Spanish translation and DarvinSlav for Russian translation.", "logoFile": "", "screenshots": [], "dependencies": [] diff --git a/Treasure2-1.12.2/update.json b/Treasure2-1.12.2/update.json index 64058a423..531234262 100644 --- a/Treasure2-1.12.2/update.json +++ b/Treasure2-1.12.2/update.json @@ -33,7 +33,7 @@ "1.6.2": "Removed GUI config that was inadvertently added last update.", "1.6.3": "Removed debugging code that was causing underwater structures to generate too frequently.", "1.7.0": "Refactored config files into one GUI config.\nAdded Desert Wishing Well block.\nFixed Rarity enum value mappings.\nPersisted ChestRegistry.\nFixed Well generation on podzol/mycelium generating mushroom block instead of mushrooms.\nReconfigured folder locations where logging and resource files go (moved out of /mods folder.)\nUsing GottschCore v1.9.0.\n*Fixed chests not generating in some pits.\n*Fixed world properties not clearing between game world loads.\nFixed loading of ChestRegistry.\n", - "1.8.0": "Added SpawnRuins command.\nFixed/enable other spawn commands.\n" + "1.8.0": "Added Decay System.\nAdded 8 surface structures.\nAdded SpawnRuins command.\nFixed/enable other spawn commands.\nAdded Spanish translation.\nAdded Russian translation.\nFixed the number of uses a Key has.\nRemoved Lombok library.\nFixed solid base check for Surface/Submerged ruins.\nFixed Wither Tree crash bug.\n" } }