codetaylor / pyrotech-1.12

An early game mod with new primitive devices, combustion machines, smelting mechanics, storage options, tools, torches, advancements, and absolutely zero GUIs -- with exception to the substantially complete, mostly illustrated, and charred guidebook.
https://pyrotech.readthedocs.io/en/latest/
Other
52 stars 19 forks source link

Hammer tiers can't be changed #280

Closed jamesjimmy88 closed 4 years ago

jamesjimmy88 commented 4 years ago

Issue Description

It's not possible to change hammer tiers for custom recipes in the granite/ironclad anvil

What Happens

After creating a custom recipe for the anvil that uses the hammer as tool and changing the config in module.Tool.cfg to make it so obsidian tools have the same harvest level as diamond (3), the recipes still require the same number of hits as before; this is also shown in the JEI recipe window. I also tried changing the hammer's harvest level with CraftTweaker, but that doesn't change anything. The same issue applies to all hammers; I tried setting the harvest level for all tools to 3 but the recipe still shows the usual amount of hits. Also there's no way to change the harvest level of the hammers made with vanilla materials.

What You Expect to Happen

That the number of hammer hit required for the recipes respects the harvest level of the tools (it probably does already and it's simply a matter of the config ignoring hammers)

Script

//script used to change harvest level, but that doesn't change in the anvil recipe
<pyrotech:obsidian_hammer>.definition.setHarvestLevel("hammer", 3);
//cobble to gravel
mods.pyrotech.GraniteAnvil.addRecipe("custom_anvil_gravel", <minecraft:gravel>, <minecraft:cobblestone>, 6, "hammer");

Affected Versions

codetaylor commented 4 years ago

Thanks for the report. I had to look it up because I couldn't remember how it worked.

Hammer harvest level doesn't go off of the tool harvest level directly, instead it uses a list in the core config. To change the obsidian hammer harvest level as it relates to worktables, anvils, and blooms, change it in the hammers -> HAMMER_LIST in core.cfg:

        # Hammers are used on the worktables, anvils, and blooms.
        # Use this to add items that you want to be valid for hammer recipes.
        # The harvest level is used for hammer hit reduction with anvil recipes
        # and for the bloom hammer power modifier.
        # 
        # Items you add are assumed to have durability.
        # 
        # String format is a resource location: (domain):(path);(harvest_level)
        S:HAMMER_LIST <
            pyrotech:crude_hammer;0
            pyrotech:stone_hammer;1
            pyrotech:bone_hammer;1
            pyrotech:flint_hammer;1
            pyrotech:iron_hammer;2
            pyrotech:gold_hammer;1
            pyrotech:obsidian_hammer;2
            pyrotech:diamond_hammer;3
         >
jamesjimmy88 commented 4 years ago

I missed that badly, huh? Anyway, this fixes all the issues I was having, thank you.