Apollounknowndev / trimmable-tools

Trim your swords, axes, pickaxes, shovels, and hoes!
MIT License
5 stars 2 forks source link

Compatability Request: More Tool Variants, Mythic Metals, Betterend, Better Nether, All the Trims. #16

Open Sinogard opened 1 week ago

Sinogard commented 1 week ago

These mods add new materials for the vanilla tools to be made from and id like to make them trimmable and use their materials as a trimmable material. Is it possible to make this compatible with "All The Trims?" I'm willing to learn how to do any code and art work this request might need myself but I'm very much a beginner at this and would appreciate assistance if i get stuck on something for a week (looking at you my failed backpack mod).

Apollounknowndev commented 1 week ago

Mods that add new tool tiers to vanilla tools -> Compat possible, all tool model files need to be edited to make this happen. image

Mods that add new trim materials -> see here

Mods that add new trim patterns / new tool types -> You have to make the textures yourself, no guide for it.

All the Trims -> No.

Sinogard commented 1 week ago

got it. would I need to add something like this to the individual mods themselves or to Trimmable Tools for each added tool?

Th3Dandy commented 1 week ago

They add new materials ? You might want to try https://modrinth.com/datapack/trims-expanded, fully compatible with this one

Sinogard commented 6 days ago

They use vanilla materials in trims by default. "all the trims" makes every item a trim material and creates the color pattern in runtime based on the colors present in the item itself.

Th3Dandy commented 6 days ago

Ohhhh. That seems very cool then. From what I understand the pack exists but is not compatible with this one yet ? Well update me on it if you can, I'm learning Java right now, maybe in a good 10 years I could help :P

Sinogard commented 4 days ago

Got started tonight. The first step ive gathered is to update code in trimmable_tools.json with the appropriate items i wish to make trimmable right?

new code in trimmable_tools.json { "values": [ "minecraft:diamond_sword", "minecraft:stone_sword", "minecraft:golden_sword", "minecraft:netherite_sword", "minecraft:wooden_sword", "minecraft:iron_sword", "mythicmetals:copper_sword", "mythicmetals:aquarium_sword", "mythicmetals:banglum_sword", "betterend:thallasium_sword", "mythicmetals:quadrillum_sword", "mythicmetals:bronze_sword", "betternether:cincinnacite_sword", "betternether:cincinnacite_diamond_sword", "mythicmetals:midas_gold_sword", "betternether:nether_ruby_sword", "betternether:fireruby_sword", "mythicmetals:osmium_sword", "mythicmetals:steel_sword", "mythicmetals:durasteel_sword", "mythicmetals:kyber_sword", "mythicmetals:legendary_bengal_sword", "mythicmetals:carmot_sword", "betterend:terminite_sword", "mythicmetals:tidesinger_sword", "mythicmetals:runite_sword", "mythicmetals:promethium_sword", "mythicmetals:paladium_sword", "mythicmetals:adamantite_sword", "mythicmetals:mythril_sword", "mythicmetals:orichalcum_sword", "mythicmetals:hallowed_sword", "betterend:aeternium_sword", "mythicmetals:celestium_sword", "mythicmetals:metallurgium_sword", "mythicmetals:stormyx_sword", "mythicmetals:star_platinum_sword", "minecraft:diamond_axe", "minecraft:stone_axe", "minecraft:golden_axe", "minecraft:netherite_axe", "minecraft:wooden_axe", "minecraft:iron_axe", "mythicmetals:copper_axe", "mythicmetals:aquarium_axe", "mythicmetals:banglum_axe", "betterend:thallasium_axe", "mythicmetals:quadrillum_axe", "mythicmetals:bronze_axe", "betternether:cincinnacite_axe", "betternether:cincinnacite_diamond_axe", "mythicmetals:midas_gold_axe", "betternether:nether_ruby_axe", "betternether:fireruby_axe", "mythicmetals:osmium_axe", "mythicmetals:steel_axe", "mythicmetals:durasteel_axe", "mythicmetals:kyber_axe", "mythicmetals:legendary_bengal_axe", "mythicmetals:carmot_axe", "betterend:terminite_axe", "mythicmetals:tidesinger_axe", "mythicmetals:runite_axe", "mythicmetals:promethium_axe", "mythicmetals:paladium_axe", "mythicmetals:adamantite_axe", "mythicmetals:mythril_axe", "mythicmetals:orichalcum_axe", "mythicmetals:hallowed_axe", "betterend:aeternium_axe", "mythicmetals:celestium_axe", "mythicmetals:metallurgium_axe", "mythicmetals:stormyx_axe", "mythicmetals:star_platinum_axe", "minecraft:diamond_pickaxe", "minecraft:stone_pickaxe", "minecraft:golden_pickaxe", "minecraft:netherite_pickaxe", "minecraft:wooden_pickaxe", "minecraft:iron_pickaxe", "mythicmetals:copper_pickaxe", "mythicmetals:aquarium_pickaxe", "mythicmetals:banglum_pickaxe", "betterend:thallasium_pickaxe", "mythicmetals:quadrillum_pickaxe", "mythicmetals:bronze_pickaxe", "betternether:cincinnacite_pickaxe", "betternether:cincinnacite_diamond_pickaxe", "mythicmetals:midas_gold_pickaxe", "betternether:nether_ruby_pickaxe", "betternether:fireruby_pickaxe", "mythicmetals:osmium_pickaxe", "mythicmetals:steel_pickaxe", "mythicmetals:durasteel_pickaxe", "mythicmetals:kyber_pickaxe", "mythicmetals:legendary_bengal_pickaxe", "mythicmetals:carmot_pickaxe", "betterend:terminite_pickaxe", "mythicmetals:tidesinger_pickaxe", "mythicmetals:runite_pickaxe", "mythicmetals:promethium_pickaxe", "mythicmetals:paladium_pickaxe", "mythicmetals:adamantite_pickaxe", "mythicmetals:mythril_pickaxe", "mythicmetals:orichalcum_pickaxe", "mythicmetals:hallowed_pickaxe", "betterend:aeternium_pickaxe", "mythicmetals:celestium_pickaxe", "mythicmetals:metallurgium_pickaxe", "mythicmetals:stormyx_pickaxe", "mythicmetals:star_platinum_pickaxe", "minecraft:diamond_shovel", "minecraft:stone_shovel", "minecraft:golden_shovel", "minecraft:netherite_shovel", "minecraft:wooden_shovel", "minecraft:iron_shovel", "mythicmetals:copper_shovel", "mythicmetals:aquarium_shovel", "mythicmetals:banglum_shovel", "betterend:thallasium_shovel", "mythicmetals:quadrillum_shovel", "mythicmetals:bronze_shovel", "betternether:cincinnacite_shovel", "betternether:cincinnacite_diamond_shovel", "mythicmetals:midas_gold_shovel", "betternether:nether_ruby_shovel", "betternether:fireruby_shovel", "mythicmetals:osmium_shovel", "mythicmetals:steel_shovel", "mythicmetals:durasteel_shovel", "mythicmetals:kyber_shovel", "mythicmetals:legendary_bengal_shovel", "mythicmetals:carmot_shovel", "betterend:terminite_shovel", "mythicmetals:tidesinger_shovel", "mythicmetals:runite_shovel", "mythicmetals:promethium_shovel", "mythicmetals:paladium_shovel", "mythicmetals:adamantite_shovel", "mythicmetals:mythril_shovel", "mythicmetals:orichalcum_shovel", "mythicmetals:hallowed_shovel", "betterend:aeternium_shovel", "mythicmetals:celestium_shovel", "mythicmetals:metallurgium_shovel", "mythicmetals:stormyx_shovel", "mythicmetals:star_platinum_shovel", "minecraft:diamond_hoe", "minecraft:stone_hoe", "minecraft:golden_hoe", "minecraft:netherite_hoe", "minecraft:wooden_hoe", "minecraft:iron_hoe", "mythicmetals:copper_hoe", "mythicmetals:aquarium_hoe", "mythicmetals:banglum_hoe", "betterend:thallasium_hoe", "mythicmetals:quadrillum_hoe", "mythicmetals:bronze_hoe", "betternether:cincinnacite_hoe", "betternether:cincinnacite_diamond_hoe", "mythicmetals:midas_gold_hoe", "betternether:nether_ruby_hoe", "betternether:fireruby_hoe", "mythicmetals:osmium_hoe", "mythicmetals:steel_hoe", "mythicmetals:durasteel_hoe", "mythicmetals:kyber_hoe", "mythicmetals:legendary_bengal_hoe", "mythicmetals:carmot_hoe", "betterend:terminite_hoe", "mythicmetals:tidesinger_hoe", "mythicmetals:runite_hoe", "mythicmetals:promethium_hoe", "mythicmetals:paladium_hoe", "mythicmetals:adamantite_hoe", "mythicmetals:mythril_hoe", "mythicmetals:orichalcum_hoe", "mythicmetals:hallowed_hoe", "betterend:aeternium_hoe", "mythicmetals:celestium_hoe", "mythicmetals:metallurgium_hoe", "mythicmetals:stormyx_hoe", "mythicmetals:star_platinum_hoe" ] }
Sinogard commented 4 days ago

alright so im experimenting with this approach for generating the new textures. I didnt like the idea of creating a json file for each individual tool that sounded bulky. Ive gone through and created this array / dictionary to fill the same need. at this point i think all i have to do is figure out how to tie it in to the mod and I think it should work...

Array Setup ``` def get_texture_path(material, tool): texture_map = "copper": ["axe", "hoe", "pickaxe", "shovel", "sword"], "aquarium": ["axe", "hoe", "pickaxe", "shovel", "sword"], "banglum": ["axe", "hoe", "pickaxe", "shovel", "sword"], "thallasium": ["axe", "hoe", "pickaxe", "shovel", "sword"], "quadrillum": ["axe", "hoe", "pickaxe", "shovel", "sword"], "bronze": ["axe", "hoe", "pickaxe", "shovel", "sword"], "cincinnacite": ["axe", "hoe", "pickaxe", "shovel", "sword"], "cincinnacite-diamond": ["axe", "hoe", "pickaxe", "shovel", "sword"], "midas_gold": ["axe", "hoe", "pickaxe", "shovel", "sword"], "nether_ruby": ["axe", "hoe", "pickaxe", "shovel", "sword"], "fireruby": ["axe", "hoe", "pickaxe", "shovel", "sword"], "osmium": ["axe", "hoe", "pickaxe", "shovel", "sword"], "steel": ["axe", "hoe", "pickaxe", "shovel", "sword"], "durasteel": ["axe", "hoe", "pickaxe", "shovel", "sword"], "kyber": ["axe", "hoe", "pickaxe", "shovel", "sword"], "legendary_bengal": ["axe", "hoe", "pickaxe", "shovel", "sword"], "carmot": ["axe", "hoe", "pickaxe", "shovel", "sword"], "terminite": ["axe", "hoe", "pickaxe", "shovel", "sword"], "tidesinger": ["axe", "hoe", "pickaxe", "shovel", "sword"], "runite": ["axe", "hoe", "pickaxe", "shovel", "sword"], "promethium": ["axe", "hoe", "pickaxe", "shovel", "sword"], "paladium": ["axe", "hoe", "pickaxe", "shovel", "sword"], "adamantite": ["axe", "hoe", "pickaxe", "shovel", "sword"], "mythril": ["axe", "hoe", "pickaxe", "shovel", "sword"], "orichalcum": ["axe", "hoe", "pickaxe", "shovel", "sword"], "hallowed": ["axe", "hoe", "pickaxe", "shovel", "sword"], "aeternium": ["axe", "hoe", "pickaxe", "shovel", "sword"], "celestium": ["axe", "hoe", "pickaxe", "shovel", "sword"], "metallurgium": ["axe", "hoe", "pickaxe", "shovel", "sword"], "stormyx": ["axe", "hoe", "pickaxe", "shovel", "sword"], "stone": ["axe", "hoe", "pickaxe", "shovel", "sword"], "wood": ["axe", "hoe", "pickaxe", "shovel", "sword"], "gold": ["axe", "hoe", "pickaxe", "shovel", "sword"], "iron": ["axe", "hoe", "pickaxe", "shovel", "sword"], "diamond": ["axe", "hoe", "pickaxe", "shovel", "sword"], "star_platinum": ["axe", "hoe", "pickaxe", "shovel", "sword"], "netherite": ["axe", "hoe", "pickaxe", "shovel", "sword"] base_paths = { "minecraft": "minecraft:textures/items/", "mythicmetals": "mythicmetals:textures/items/", "betterend": "betterend:textures/items/", "betternether": "betternether:textures/items/" } texture_layers = [] for tool in texture_map.get(material, []): for mod, base_path in base_paths.items(): texture_path = f"{base_path}{material}_{tool}.png" texture_layers.append({"layer0": texture_path}) return texture_layers ```

I think this will make adding additional mods easier but then I also need to figure out how to make it detect which mods are present so as to prevent needing them as a dependency. I'll work on that last I think. For now the next step is tying this new array into the mod itself and seeing if it works.