MineTweaker3 icon indicating copy to clipboard operation
MineTweaker3 copied to clipboard

Regex/Wildcard support for NBT.

Open Keridos opened this issue 10 years ago • 7 comments

I am trying to add recipes for ExtraUtilities ingots (because some mods bug them) and I cannot find a proper way to add the normal activated sigil recipes (not the stable one) since they have an nbt tag with {damage: x} where x is a number between 1 and 256. I would need to create 256 different recipes for this.

Keridos avatar Dec 11 '15 08:12 Keridos

That would definitely be useful. Until/unless it's implemented and released, I can write a perl script to make the recipes for you. Tell me what recipe(s) you're trying to make and I'll pastebin the ZS file.

VariableVixen avatar Dec 11 '15 11:12 VariableVixen

Its just that I need a recipe for every nbt for ExtraUtilities:divisionSigil with an NBT Tag like this: {damage: x} where x is a number between 1 and 256. Called normalSigil in my recipe.

recipes.addShaped(<ExtraUtilities:unstableingot>,[[ironIngot],[normalSigil],[diamond]]);

Thanks in Advance @PrincessRTFM

Keridos avatar Dec 11 '15 12:12 Keridos

Nil sheen, here you go.

VariableVixen avatar Dec 11 '15 14:12 VariableVixen

Thanks a lot :)

Keridos avatar Dec 11 '15 15:12 Keridos

Got a proper script written up now. You can copy and paste it or pull up a command line and run curl ix.io/mKL > expander.pl for a local copy. Runs as <script> key1 value1 key2 value2 [...] inputfile outputfile and autoexpands loops written as ${<start>-<end>}. Keys written in the input file as $[<key>] are replaced by their values, undefined keys are left as-is. Requires IO::All and Getopt::Long modules.

Hopefully that'll work until wildcard support is implemented.

VariableVixen avatar Dec 11 '15 18:12 VariableVixen

~Have you tried to wild card it then remove the stable explicitly (and possibly re-adding it if needed)?~ ~Edit: IDK what I was thinking, must have been sleep deprived.~ Edit: I remembered what I was thinking, I meant to create a recipe for ALL the Sigils then removing the Stable explicitly, but I forgot the UnCharged Sigil in my idea.

var normalSigil = <ExtraUtilities:divisionSigil:*>; // I don't recall the correct ID Name for it offhand.
# then remove from var normalSigil the uncharged and stable Sigils.
for item in normalSigil {
  recipes.addShaped(<ExtraUtilities:unstableingot>,[[ironIngot],[normalSigil],[diamond]]);
};

something like that was probably my idea.

Blue64 avatar Dec 12 '15 19:12 Blue64

@jaredlll08 @fluffle @Yulife I know y'all know the system REALLY well, is there some kind of way to actually preform this function currently?

If not a .withTag({Damage: *}) (which I'm already guessing doesn't work), is there perhaps a .withTag({min.Damage:0 max.Damage:256}) type of thing? or perhaps some kind of try loop or function loop?

Edit: Merged Posts:

I should probably mention that I'm referring to "Within the constraints of 1.7.10" which is where this question originated I believe. but if there is one that came out after 1.7.10, feel free to mention it..

Blue64 avatar May 11 '17 02:05 Blue64