diff --git a/Treasure2-1.12.2/build.gradle b/Treasure2-1.12.2/build.gradle index d4e15bd30..c8058c87e 100644 --- a/Treasure2-1.12.2/build.gradle +++ b/Treasure2-1.12.2/build.gradle @@ -11,7 +11,9 @@ 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" } 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,17 +76,45 @@ 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 {} +} + +//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 12b74d037..79a5b6985 100644 --- a/Treasure2-1.12.2/gradle.properties +++ b/Treasure2-1.12.2/gradle.properties @@ -7,13 +7,14 @@ 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 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/ +dest_server_folder=F:/Minecraft Server/mods/ \ No newline at end of file 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 024c9a00c..d2fbec7a8 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; @@ -71,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 ) @@ -80,14 +82,16 @@ "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.", + "Credits to OdinsRagnarok for Spanish translation and DarvinSlav for Russian translation." }) 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"; @@ -127,6 +131,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 +191,7 @@ public void serverStarted(FMLServerStartingEvent event) { event.registerServerCommand(new SpawnPitStructureOnlyCommand()); event.registerServerCommand(new SpawnWellStructureCommand()); event.registerServerCommand(new SpawnWitherTreeCommand()); + event.registerServerCommand(new SpawnRuinsCommand()); } /** @@ -219,6 +226,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/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/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/SpawnRuinsCommand.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java new file mode 100644 index 000000000..0cf922dbb --- /dev/null +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/command/SpawnRuinsCommand.java @@ -0,0 +1,122 @@ +/** + * + */ +package com.someguyssoftware.treasure2.command; + +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.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; +import net.minecraft.command.ICommandSender; +import net.minecraft.server.MinecraftServer; +import net.minecraft.world.World; + +/** + * + * @author Mark Gottschling on Jan 25, 2018 + * + */ +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"; + } + + @Override + public String getUsage(ICommandSender var1) { + return "/t2-ruins [-ruleset ]: spawns ruins at location (x, y, z)"; + } + + @Override + public void execute(MinecraftServer server, ICommandSender commandSender, String[] args) { + 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]); + + // 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("\\", "/"); + ruleSet = Treasure.DECAY_MANAGER.getRuleSetMap().get(key); + } + Rarity rarity = Rarity.values()[random.nextInt(Rarity.values().length)]; + IChestConfig config = TreasureConfig.CHESTS.surfaceChests.configMap.get(rarity); + // generate + 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/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) { 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 e9100bf58..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; @@ -241,6 +240,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(); @@ -567,6 +570,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( @@ -624,6 +629,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; + } + /* * */ @@ -701,76 +717,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/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/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/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/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/chest/IChestGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/chest/IChestGenerator.java index 9bc9e0d7b..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 @@ -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); @@ -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/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/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 3f8506747..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 @@ -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,33 @@ 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); + 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; + } - void buildVanillaSpawners(World world, Random random, ICoords spawnCoords, List spawnerCoords); + default public void buildOneTimeSpawners(World world, Random random, List proximityCoords, Quantity quantity, double d) { + for (ICoords c : proximityCoords) { + 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)); + te.setProximity(5D); + } + } + default public void buildVanillaSpawners(World world, Random random, List spawnerCoords) { + for (ICoords c : spawnerCoords) { + 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 2843a0550..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 @@ -9,28 +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 @@ -38,32 +36,39 @@ */ public class SubmergedRuinGenerator implements IRuinGenerator> { + private static final double REQUIRED_BASE_SIZE = 50; + /** * */ public SubmergedRuinGenerator() {} - @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); - // 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 /* * 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 @@ -85,25 +90,20 @@ 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 { - continue; + break; } } @@ -114,8 +114,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 && 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) { + 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); @@ -125,37 +145,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 new file mode 100644 index 000000000..d8811ed5e --- /dev/null +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java @@ -0,0 +1,176 @@ +/** + * + */ +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.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.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.world.gen.structure.TemplateGenerator; +import com.someguyssoftware.treasure2.world.gen.structure.TemplateHolder; + +import net.minecraft.util.Rotation; +import net.minecraft.world.World; +import net.minecraft.world.gen.structure.template.PlacementSettings; + +/** + * + * @author Mark Gottschling on Dec 13, 2019 + * + */ +public class SurfaceRuinGenerator implements IRuinGenerator> { + + private static final double REQUIRED_BASE_SIZE = 80; + private static final double REQUIRED_AIR_SIZE = 60; + + /** + * + */ + 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 % land base + 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 == 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 { + 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 + */ + // 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()); + + // 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 && holder.getDecayRuleSetLocation().size() > 0) { + // create a decay processor + 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) { + 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, spawnerCoords); + + // populate proximity spawners + buildOneTimeSpawners(world, random, proximityCoords, new Quantity(1,2), 5D); + + result.setData(genResult.getData()); + + return result.success(); + } +} 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 5ed7144a1..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 @@ -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. } @@ -180,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; @@ -233,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) { 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 926bc68ac..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 @@ -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 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..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,6 +15,7 @@ public class StructureMeta extends Meta { private int verticalOffset; private boolean includeGraves; private boolean includeFog; + private List decayRuleSetName; public StructureMeta() {} @@ -35,7 +38,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 +53,13 @@ public int getVerticalOffset() { public void setVerticalOffset(int verticalOffset) { this.verticalOffset = verticalOffset; } + + public List getDecayRuleSetName() { + return decayRuleSetName; + } + + public void setDecayRuleSetName(List 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 8cdb41cb3..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 @@ -10,35 +10,41 @@ import com.someguyssoftware.gottschcore.positional.Coords; 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 com.sun.media.jfxmedia.logging.Logger; -import lombok.Setter; 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; 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); + private static final PropertyDirection FACING = BlockHorizontal.FACING; + private static final PropertyEnum CHEST_FACING = PropertyDirection.create("facing", EnumFacing.class); private Block nullBlock; @@ -48,17 +54,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) { @@ -87,42 +99,45 @@ public GeneratorResult generate(World world, Random rando ICoords spawnCoords = coords.add(0, offset, 0); // generate the structure - template.addBlocksToWorld(world, spawnCoords.toPos(), placement, getNullBlock(), Treasure.TEMPLATE_MANAGER.getReplacementMap(), 3); - - Treasure.logger.debug("added blocks to the world."); + 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); + } - // TODO do this BEFORE removing specials - // process all markers and adding them to the result data (relative positioned) - for (Entry entry : template.getMap().entries()) { - ICoords c = new Coords(GottschTemplate.transformedCoords(placement, entry.getValue())); + // process all markers and adding them to the result data (absolute positioned) + 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 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)); - 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()); } } - - // 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()); +// 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); @@ -180,4 +195,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/world/gen/structure/TemplateHolder.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateHolder.java index 554021ddd..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,9 +17,17 @@ public class TemplateHolder { private Template template; private ResourceLocation location; private ResourceLocation metaLocation; + private List decayRuleSetLocation; public TemplateHolder() {} + public TemplateHolder(Template template, ResourceLocation location, ResourceLocation metaLocation, List ruleSetLocation) { + setTemplate(template); + setLocation(metaLocation); + setMetaLocation(metaLocation); + setDecayRuleSetLocation(ruleSetLocation); + } + public TemplateHolder(Template template, ResourceLocation location, ResourceLocation metaLocation) { setTemplate(template); setLocation(metaLocation); @@ -54,4 +65,22 @@ public TemplateHolder setMetaLocation(ResourceLocation metaLocation) { this.metaLocation = metaLocation; return this; } + + public List getDecayRuleSetLocation() { + if (decayRuleSetLocation == null) { + decayRuleSetLocation = new ArrayList<>(); + } + return decayRuleSetLocation; + } + + public TemplateHolder setDecayRuleSetLocation(List 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..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 @@ -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,39 @@ 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 + 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 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 +212,19 @@ public void register(String modID) { * @param template */ private void mapToTemplatesByArchetypeBiome(ResourceLocation metaResourceLocation, - ResourceLocation location, IMetaArchetype archetype, IMetaType type, Template template) { + ResourceLocation location, List 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); @@ -265,15 +288,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(); @@ -290,11 +311,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/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 bd2f5c6e2..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,6 +24,7 @@ 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.IDecayRuleSet; import com.someguyssoftware.treasure2.Treasure; import com.someguyssoftware.treasure2.biome.TreasureBiomeHelper; import com.someguyssoftware.treasure2.biome.TreasureBiomeHelper.Result; @@ -36,6 +37,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,11 +56,10 @@ 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; -import lombok.Getter; -import lombok.Setter; import net.minecraft.init.Biomes; import net.minecraft.world.World; import net.minecraft.world.biome.Biome; @@ -71,7 +72,6 @@ * @author Mark Gottschling on Jan 22, 2018 * */ -@Getter @Setter public class SurfaceChestWorldGenerator implements ITreasureWorldGenerator { protected static int UNDERGROUND_OFFSET = 5; @@ -292,16 +292,17 @@ 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; boolean hasMarkers = true; + boolean isSurfaceChest = false; // result to return to the caller GeneratorResult result = new GeneratorResult<>(GeneratorData.class); @@ -320,20 +321,23 @@ 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)) { - // 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(); } else { // set the chest coords to the surface pos chestCoords = new Coords(markerCoords); - Treasure.logger.debug("Above ground, chest only @ {}", chestCoords.toShortString()); } } else if (config.isSubterraneanAllowed()) { @@ -354,9 +358,9 @@ else if (config.isSubterraneanAllowed()) { // add markers (above chest or shaft) if (hasMarkers) { - chestSelector.addMarkers(world, random, markerCoords); + chestGenerator.addMarkers(world, random, markerCoords, isSurfaceChest); } - 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 +370,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 +510,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 @@ -495,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; + } } 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..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) { @@ -314,9 +319,11 @@ 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(); 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); @@ -345,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)); } } @@ -383,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++) { @@ -416,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; @@ -425,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; @@ -464,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); } } @@ -497,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)); @@ -530,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++) { @@ -547,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; @@ -605,11 +607,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/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/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=Cajón +tile.treasure2:crate_chest_moldy.name=Cajón 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=Lápida de Piedra +tile.treasure2:gravestone1_cobblestone.name=Lápida de Adoquines +tile.treasure2:gravestone1_mossy_cobblestone.name=Lápida de Adoquines Musgosos +tile.treasure2:gravestone1_polished_granite.name=Lápida de Granito +tile.treasure2:gravestone1_polished_andesite.name=Lápida de Andesita +tile.treasure2:gravestone1_polished_diorite.name=Lápida de Diorita +tile.treasure2:gravestone1_obsidian.name=Lápida de Obsidiana + +tile.treasure2:gravestone2_stone.name=Lápida de Piedra +tile.treasure2:gravestone2_cobblestone.name=Lápida de Adoquines +tile.treasure2:gravestone2_mossy_cobblestone.name=Lápida de Adoquines Musgosos +tile.treasure2:gravestone2_polished_granite.name=Lápida de Granito +tile.treasure2:gravestone2_polished_andesite.name=Lápida de Andesita +tile.treasure2:gravestone2_polished_diorite.name=Lápida de Diorita +tile.treasure2:gravestone2_obsidian.name=Lápida de Obsidiana + +tile.treasure2:gravestone3_stone.name=Lápida de Piedra +tile.treasure2:gravestone3_cobblestone.name=Lápida de Adoquines +tile.treasure2:gravestone3_mossy_cobblestone.name=Lápida de Adoquines Musgosos +tile.treasure2:gravestone3_polished_granite.name=Lápida de Granito +tile.treasure2:gravestone3_polished_andesite.name=Lápida de Andesita +tile.treasure2:gravestone3_polished_diorite.name=Lápida de Diorita +tile.treasure2:gravestone3_obsidian.name=Lápida 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=Raíz 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 Español + + +#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 Arácnida +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 Arácnida +item.treasure2:wither_lock.name=Cerradura Marchita + +item.treasure2:wither_stick_item.name=Rama Marchita +item.treasure2:wither_root_item.name=Raíz Marchita +item.treasure2:pilferers_lock_pick.name=Garzúa del Ladronzuelo +item.treasure2:thiefs_lock_pick.name=Garzúa del Ladrón + +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 Español +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=Categoría: %s +tooltip.label.max_uses=Máx Usos: %s +tooltip.label.breakable=Rompible: %s +tooltip.label.craftable=Elaborable: %s +tooltip.label.damageable=Dañable: %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 / Garzúas + +tooltip.label.max_locks=Máx de Cerraduras: %s +tooltip.label.container_size=Tamaño del Inventario: %s + +tooltip.metallurgists_key.specials=Abre cualquier cerradura en la categoría 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 categoría GEMAS + +tooltip.painting.name=%s +tooltip.painting.collection=Colección: %s +tooltip.painting.issue=Problema: %s/%s +tooltip.painting.artist=por %s + + +#gui +display.wood_chest.name=Cofre de Madera +display.crate_chest.name=Cajón +display.crate_chest_moldy.name=Cajón 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 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/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/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/decay/treasure2/aged_ruleset.json b/Treasure2-1.12.2/src/resources/decay/treasure2/aged_ruleset.json new file mode 100644 index 000000000..a7bc67b11 --- /dev/null +++ b/Treasure2-1.12.2/src/resources/decay/treasure2/aged_ruleset.json @@ -0,0 +1,119 @@ +{ + "name": "aged", + "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/decay/treasure2/default_ruleset.json b/Treasure2-1.12.2/src/resources/decay/treasure2/default_ruleset.json new file mode 100644 index 000000000..567fb03b4 --- /dev/null +++ b/Treasure2-1.12.2/src/resources/decay/treasure2/default_ruleset.json @@ -0,0 +1,119 @@ + { + "name": "default", + "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": { + "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 new file mode 100644 index 000000000..09014687c --- /dev/null +++ b/Treasure2-1.12.2/src/resources/decay/treasure2/ruinous_ruleset.json @@ -0,0 +1,119 @@ + { + "name": "ruinous", + "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": { + "decayIterations": 6, + "decayProbability": 30.0, + "decayBlocks": [ + "minecraft:stonebrick@1", + "minecraft:stonebrick@2", + "minecraft:cobblestone@0", + "minecraft:gravel@0", + "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": { + "decayIterations": 3, + "decayProbability": 25.0, + "decayBlocks": [ + "minecraft:stone_stairs@0", + "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/mcmod.info b/Treasure2-1.12.2/src/resources/mcmod.info index d99f091a0..1f188d73b 100644 --- a/Treasure2-1.12.2/src/resources/mcmod.info +++ b/Treasure2-1.12.2/src/resources/mcmod.info @@ -3,12 +3,12 @@ "modid": "treasure2", "name": "Treasure2!", "description": "", - "version": "1.6.3", + "version": "1.8.0", "mcversion": "1.12.2", "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. OdinsRagnarok for Spanish translation and DarvinSlav for Russian translation.", "logoFile": "", "screenshots": [], "dependencies": [] 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..4efb06205 --- /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", "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 new file mode 100644 index 000000000..68f48b9a8 --- /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", "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 new file mode 100644 index 000000000..dfcfa840c --- /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", "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 new file mode 100644 index 000000000..5d93ec472 --- /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", "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 new file mode 100644 index 000000000..35747cd34 --- /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", "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 new file mode 100644 index 000000000..a6716f056 --- /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", "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 new file mode 100644 index 000000000..94ea5b450 --- /dev/null +++ b/Treasure2-1.12.2/src/resources/meta/treasure2/structures/tower3.json @@ -0,0 +1,17 @@ +{ + "name": "tower3", + "description": "", + "author": "gottsch", + "archetypes": ["surface"], + "type": "ruin", + "themes": ["dungeon"], + "rarities": ["common"], + "biomeWhiteList": [], + "biomeBlackList": [], + "offset": { + "x": 0, + "y": -1, + "z": 0 + }, + "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 new file mode 100644 index 000000000..680aa872e --- /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", "aged_ruleset", "ruinous_ruleset"] +} \ No newline at end of file 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 000000000..c560243cb Binary files /dev/null and b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/blacksmith1.nbt differ 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 000000000..d4ca0b48e Binary files /dev/null and b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/church1.nbt differ diff --git a/Treasure2-1.12.2/src/resources/structures/treasure2/surface/desert-tower2.nbt b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/desert-tower2.nbt new file mode 100644 index 000000000..51415ce13 Binary files /dev/null and b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/desert-tower2.nbt differ diff --git a/Treasure2-1.12.2/src/resources/structures/treasure2/surface/house1.nbt b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/house1.nbt new file mode 100644 index 000000000..ce2790269 Binary files /dev/null and b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/house1.nbt differ diff --git a/Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower1.nbt b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower1.nbt new file mode 100644 index 000000000..d15c18134 Binary files /dev/null and b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower1.nbt differ 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 000000000..677ca8b63 Binary files /dev/null and b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower2.nbt differ diff --git a/Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower3.nbt b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower3.nbt new file mode 100644 index 000000000..c275f04fd Binary files /dev/null and b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower3.nbt differ 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 000000000..f7652d241 Binary files /dev/null and b/Treasure2-1.12.2/src/resources/structures/treasure2/surface/tower4.nbt differ diff --git a/Treasure2-1.12.2/update.json b/Treasure2-1.12.2/update.json index 201bbcb4f..531234262 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", @@ -23,7 +23,7 @@ "1.3.5": "Updated to use GottschCore v1.7\nAdded Cauldron Chest (epic).\nAdded Skeleton Block.\nAdded Marker Generator.\nFixed world.isRemote() checks with GottschCore call WorldInfo.isServer/Client().\nExpose custom loot tables.\nUse of GottschCore Loot Tables system instead of Treasure2s.\nFixed so that Skeletons can be placed in Fog.\n", "1.3.6": "Fixed Coin toss in well crash bug.\nRemoved all references to old Loot Tables setup (in ref to coin/well bug).\nFix foreign mod loot table registering.\nUpdated mocreates, sgs metals loot tables to point to right loot tables.\n", "1.3.7": "Fixed bug where Treasure items weren't being added to chests.\n", - "1.4.1": "Add Structures add Structure files.\nUpdate MobTrapPitGenerator to use Proximity Spawners.\nFixed World Generators map - use Enum instead of String.\nRefactor Pit selection code.\n", + "1.4.1": "Added Structures and Structure files.\nUpdate MobTrapPitGenerator to use Proximity Spawners.\nFixed World Generators map - use Enum instead of String.\nRefactor Pit selection code.\n", "1.4.2": "Fixed DataFixer server-side crash.\nFixed AbstractChestGenerator crash.\nRemoved Structure Pit Generators that didnt make sense, ie. Big Bottom, Lava Trap.\nExpanded code when retrieving chest coords from pit structure.\n", "1.4.3": "Fixed AbstractChestGenerator crash again -> 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.", @@ -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": "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" } }