MineTweaker/ModTweaker - A help and suggestions thread.

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Xavion

New Member
Jul 29, 2019
1,025
-3
0
Thanks for this @Xavion! I actually didn't have a particular application in mind, I was thinking more generally - I'm trying to up my minetweaker knowledge in general! So, if I'm right in thinking this, the metadata shows up as numbers after a colon in the item ID, right? And then NBT is text and other information attached to the item. It sounds like damage is a separate thing again, but doesn't the damage an item has taken also show up in the metadata in some cases? So the values after the colon in the ID change as it takes damage, as well as the bar going down?
That's all correct yeah, worth noting though that nearly all tools use metadata to track durability used, the primary exception being rechargeable tools which tend to do weirder stuff. Also GT tools which invariably do a lot of stuff with NBT.

But yeah, metadata is that single number after the id, NBT can be basically whatever you want and is used for anything more complex.
 
  • Like
Reactions: GamerwithnoGame

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
That's all correct yeah, worth noting though that nearly all tools use metadata to track durability used, the primary exception being rechargeable tools which tend to do weirder stuff. Also GT tools which invariably do a lot of stuff with NBT.

But yeah, metadata is that single number after the id, NBT can be basically whatever you want and is used for anything more complex.
Ah great, OK! Thanks for that, that's really cleared it up! :)
 

jordsta95

New Member
Jul 29, 2019
5,056
-4
1
This is wrong, what's being described here is metadata, not NBT.

That said in answer to this question. Here's an example from the wiki, it allows you to craft a stone pickaxe with cobblestone to repair 25 damage.
Code:
recipes.addShapeless(<minecraft:stone_pickaxe>, [<minecraft:stone_pickaxe>.anyDamage().marked("pick"), <minecraft:cobblestone>], function(output, inputs, crafting) {
  // the max is there to make sure that the damage doesn't go negative
  // fixes 25 damage per cobblestone
  return inputs.pick.withDamage(max(0, inputs.pick.damage - 25));
});
You can do stuff with NBT too, I helped someone recently set it up so you could do something like iron pickaxe + diamond => diamond pickaxe and it would keep all enchantments from the iron pick. Tell us what you actually want to do and we should be able to provide more help.
Today I learned. It's been a while since I touched metadata. So I stand corrected
 

shadoxxHD

New Member
Jul 29, 2019
9
0
0
I want to add crafting recipes for adding and removing chaos cores from draconic evolution items. the upgrade modifier can only apply upgrades up to the level of the item, and since the top tier is draconic atm, I normally can't use chaos cores to upgrade draconic evolution stuff (the logic for chaos cores is implemented though - I testet it with an nbt editor). So eg. putting a core in the left top corner adds to shield energy, right top entropy regen, left bottom energy capacity etc. (the upgraded item goes in the middle slot). Putting the armor/tool in the crafting grid by itself, it should remove one of the upgrades (first chaos, then draconic and so on) and put the core back in your inventory (like empty buckets). Also, it should not be possible to exceed the total item-dependent upgrade maximum (eg. only 10 cores of any type/any slot for a draconic chestplate).
Any Ideas how I could realize this w/o crazy amounts of script?
 

goreae

Ultimate Murderous Fiend
Nov 27, 2012
1,784
2,649
273
Raxacoricofallapatorius
I want to add crafting recipes for adding and removing chaos cores from draconic evolution items. the upgrade modifier can only apply upgrades up to the level of the item, and since the top tier is draconic atm, I normally can't use chaos cores to upgrade draconic evolution stuff (the logic for chaos cores is implemented though - I testet it with an nbt editor). So eg. putting a core in the left top corner adds to shield energy, right top entropy regen, left bottom energy capacity etc. (the upgraded item goes in the middle slot). Putting the armor/tool in the crafting grid by itself, it should remove one of the upgrades (first chaos, then draconic and so on) and put the core back in your inventory (like empty buckets). Also, it should not be possible to exceed the total item-dependent upgrade maximum (eg. only 10 cores of any type/any slot for a draconic chestplate).
Any Ideas how I could realize this w/o crazy amounts of script?
Not really. You'd have to make a recipe for each permutation. 3 possibilities over ten tiers is 59049 recipes if my math isn't entirely terrible. This sort of recipe is much easier done with a small custom mod. You can then program the increase in level as "core in upper left corner: shield +1, chaos +1" and make the recipe stop working if chaos is ten. But with minetweaker I don't think it's possible. Though there might be some undocumented way to do it and I just don't know of it.
 

Xavion

New Member
Jul 29, 2019
1,025
-3
0
You can loop with minetweaker remember, as long as it follows a pattern a couple of nested loops should do the trick. Maybe a function output could work too if it's simple enough.
 

goreae

Ultimate Murderous Fiend
Nov 27, 2012
1,784
2,649
273
Raxacoricofallapatorius
You can loop with minetweaker remember, as long as it follows a pattern a couple of nested loops should do the trick. Maybe a function output could work too if it's simple enough.
yeah but loops also require a table for each loop. Which if you nest it wouldn't be too bad, but still it would make 60,000 recipes! I'm no expert on this, but I would think the game would freak out a bit at that.

Though I have no idea how to use function recipes properly as the documentation for them is iffy at best.
 

Djbapt

New Member
Jul 29, 2019
18
0
0
Hi, I'd like to know if it is possible to add new barrel recipes from Ex Nihilo mod. One recipe like : Dust into Barrel filled with Water = Clay; Sand into Barrel filled with Witch water = Soul Sand; So I would like, i don't know, Cobblestone into barrel filled with lava = Stone. Would it be possible?
 
  • Like
Reactions: GamerwithnoGame

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
Hi, I'd like to know if it is possible to add new barrel recipes from Ex Nihilo mod. One recipe like : Dust into Barrel filled with Water = Clay; Sand into Barrel filled with Witch water = Soul Sand; So I would like, i don't know, Cobblestone into barrel filled with lava = Stone. Would it be possible?
Here is a link which may help: Modtweaker, Ex Nihilo support

EDIT: Unfortunately though, I see composting, hammers, sieves and crucibles but not barrels, which is what you need... hmm.
 

Djbapt

New Member
Jul 29, 2019
18
0
0
Yep :/ It is because I didn't found on the wiki, so I came here to ask if something was missing...
 

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
The only other thing I could suggest is this: if you have the Agrarian Skies 2 modpack downloaded, have a look and see if there is a scripts folder; there might be a modtweaker script in there as there may have been custom recipes added to the barrel for that pack; if not it may be that the barrel can't be added to! I'd be most surprised, but that may be the case.

Good luck, and good hunting!
 

Djbapt

New Member
Jul 29, 2019
18
0
0
No, composting will allways create Dirt. Barrel are used for 2 things, composting and create objects of mobs if there is a fluid in the barrel (so Soul Sand, Clay, but also to invoke a blaze or an enderman with the puppets). I want the recipe like the ones I gave as examples.
 

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
No, composting will allways create Dirt. Barrel are used for 2 things, composting and create objects of mobs if there is a fluid in the barrel (so Soul Sand, Clay, but also to invoke a blaze or an enderman with the puppets). I want the recipe like the ones I gave as examples.
Ah, now, if anyone knows what they're talking about when it comes to this stuff - especially when looking at minetweaker and modtweaker, its @jordsta95! Do you know how you can change the output?
EDIT : hum, strange thing, AG2 hasn't mineteaker.
D'oh! Really sorry, I really thought it was in there!
EDIT: Turns out all the changes I'd assumed were made by Minetweaker and Modtweaker were in fact made by Jaded Tweaks! *facepalms*
 
Last edited:

Lethosos

New Member
Jul 29, 2019
898
-7
0
No, composting will allways create Dirt. Barrel are used for 2 things, composting and create objects of mobs if there is a fluid in the barrel (so Soul Sand, Clay, but also to invoke a blaze or an enderman with the puppets). I want the recipe like the ones I gave as examples.
Wood or Stone barrels?

That trips some people up.

Sent from my Puzzle Box of Yogg-Saron using Tapatalk
 

jordsta95

New Member
Jul 29, 2019
5,056
-4
1
Just looked through the source code of Modtweaker, and unfortunately it seems the only recipes for the barrels are the composting ones :/
 

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
Just looked through the source code of Modtweaker, and unfortunately it seems the only recipes for the barrels are the composting ones :/
Aw dang :(

That's so bizarre. I guess its hard-coded into the mod then? Does that apply for the thaumium barrel and the things you could do with that in AgSkies2 as well? I guess, with enough coding knowledge, you could create your own equivalent to JadedTweaks to alter behaviour of things as you needed.
 

jordsta95

New Member
Jul 29, 2019
5,056
-4
1
I dunno about the thaumium one, as that's not Ex Nihilo, it's Ex Astris (or whatever it's being called now).
Modtweaker doesn't touch that mod, but there may be config options for it.