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
J

Jaski

Guest
Im changing the recipe because infused seeds, no matter what shards used, always turn out as aer. I have revised the code below:

Code:
#Infused Seeds fix

var terraShard = <Thaumcraft:ItemShard:3>
var seeds = <minecraft:wheat_seeds>
var terraSeed = <ThaumicTinkerer:infusedSeeds>.withTag({mainAspect: {Aspects: [{amount: 1, key: terra}]},aspectTendencies: {Aspects: []}});

recipes.remove(terraSeed);

mods.thaumcraft.Infusion.addRecipe(“TT_CATEGORY”, seeds, [terraShard, terraShard, terraShard, terraShard], ”messis 32, meto 32”, terraSeed, 4);

In terms of you saying that the second line shouldnt end with a ;, in the past I have used ; at the end of such lines in the past before and it hasnt effected its execution, are you sure?
 
Last edited:

Xavion

New Member
Jul 29, 2019
1,025
-3
0
Im changing the recipe because infused seeds, no matter what shards used, always turn out as aer. I have revised the code below:
This is actually a bug with Thaumic Energistics doing something it shouldn't I believe. It oredicts all the shards together as itemShard or something, and thaumcraft supports the oredictionary so you can swap any oredicted item with any other with the same oredict entry, consequently if you oredict all the shards together you make it so that all the shards are interchangeable, any infusion recipe using a shard in thaumcraft becomes capable of accepting any time of shard.
In terms of you saying that the second line shouldnt end with a ;, in the past I have used ; at the end of such lines in the past before and it hasnt effected its execution, are you sure?
Did I sound like I said that? I didn't mean to, I meant that the error was occuring because you didn't use a ;, and you were supposed to.

All lines of code must end with a semicolon, it's because technically speaking the code only thinks lines end at a semicolon. So

Code:
var terraShard = <Thaumcraft:ItemShard:3>
var seeds = <minecraft:wheat_seeds>
var terraSeed = <ThaumicTinkerer:infusedSeeds>.withTag({mainAspect: {Aspects: [{amount: 1, key: terra}]},aspectTendencies: {Aspects: []}});

works the same as

Code:
var terraShard = <Thaumcraft:ItemShard:3> var seeds = <minecraft:wheat_seeds> var terraSeed = <ThaumicTinkerer:infusedSeeds>.withTag({mainAspect: {Aspects: [{amount: 1, key: terra}]},aspectTendencies: {Aspects: []}});

You want

Code:
var terraShard = <Thaumcraft:ItemShard:3>;
var seeds = <minecraft:wheat_seeds>;
var terraSeed = <ThaumicTinkerer:infusedSeeds>.withTag({mainAspect: {Aspects: [{amount: 1, key: terra}]},aspectTendencies: {Aspects: []}});
 
J

Jwigou

Guest

--please watch the video before reading this.
I want a simple way to replace vanilla crafting table with the gany's worktable in the recipes above
 
W

WaveThunder

Guest
Hi, I'm new to ModTweaker, and my goal is to simply modify Forestry's carpenter recipe from (stick, wool, creosote) to (stick, wool, beeswax, creosote). I am removing the vanilla recipe successfully. I figured the way to do that is to remove the original recipe and add a new one. I found this page (http://minetweaker3.powerofbytes.com/wiki/ModTweaker:Forestry_Support), followed the Carpenter examples, and I can't get it to work. The removal part doesn't error but the recipe is still there in game. The addition recipe errors with a message that there's no method with those parameters. I'm a programmer, so I understand what's going on there, I just don't know how to fix it :(. Help?

// File generated by MineTweakerRecipeMaker
// READ THIS HEADER BEFORE EDITING ANYTHING
// ================================================================================
// This file is read and changed by the mod.
// If you remove/edit any of the markers, IT WILL STOP WORKING!
// If you want to make manual edits, make a backup of this file!
// Markers look like this: "//#MARKER something"
// They indicate where calls should be placed, so that MineTweaker does them in the correct order.
// Removes come first, then stuff is added.
// ================================================================================
//

// ================================================================================
//#MARKER REMOVE

// ================================================================================
//#MARKER REMOVE SHAPELESS
mods.forestry.Carpenter.removeRecipe(<minecraft:torch>, <liquid:creosote>);

// ================================================================================
//#MARKER REMOVE SHAPED
recipes.removeShaped(<minecraft:torch> * 4, [[<minecraft:coal>], [<ore:stickWood>]]);
recipes.removeShaped(<minecraft:torch>, [[<minecraft:coal>], [<ore:stickWood>]]);
recipes.removeShaped(<minecraft:torch> * 4, [[<ore:charcoal>], [<ore:stickWood>]]);
recipes.removeShaped(<minecraft:torch>, [[<ore:charcoal>], [<ore:stickWood>]]);

// ================================================================================
//#MARKER ADD

// ================================================================================
//#MARKER ADD SHAPELESS

// OutputStack, InputArray, Time in Ticks, (InputFluid), (BoxStack)
mods.forestry.Carpenter.addRecipe(<ore:stickWood>, [
[null, <ore:blockWool>, null],
[null, <ore:itemBeeswax>, null],
[null, <ore:stickWood>, null]], 20, <liquid:creosote> * 100);

// ================================================================================
//#MARKER ADD SHAPED
 

LordPINE

Well-Known Member
Jan 2, 2016
345
249
69
You reversed the InputFluid and Time in Ticks. Optional arguments can go in the middle of the list, as it should in this case. The other problem is that it can not output an oredictionary item, shouldn't the output be a torch in this case? The correct way probably is

mods.forestry.Carpenter.addRecipe(<minecraft:torch>, [
[null, <ore:blockWool>, null],
[null, <ore:itemBeeswax>, null],
[null, <ore:stickWood>, null]], <liquid:creosote> * 100,20);

The recipe removal should be correct, but there is a bug in Modtweaker currently that will not show it being removed. You shouldn't be able to craft it that way anymore though.
 

Xavion

New Member
Jul 29, 2019
1,025
-3
0
I'm attempting to create a custom recipe using a recipe function, craft an enchanted book with a drum of liquid XP to boost the level of the enchants and take some of the XP based off what level it is. I can nearly do it too, my big problem is that I'm attempting to do it in 1.7.10 so lack recipe actions so need to figure out how to do it otherwise. There's two issues I'm facing as a result

  1. How to output two items that were determined dynamically
  2. How to make a recipe invalid, for example if you don't have enough liquid XP
For reference, here is some example code which is how far I've gotten. Issues notably are that the two return inputs.book; which are done only because I can't figure out how to make a recipe invalid, returning null crashes when you put it into a crafting thing. There's also the catch with the two returns, as I'm able to get both items but am as of yet unable to figure out how to give you both on crafting.
Code:
recipes.addShapeless(
  <minecraft:enchanted_book>,
  [<minecraft:enchanted_book>.onlyWithTag({StoredEnchantments:[]}).marked("book"), <ExtraUtilities:drum>.withTag({Fluid: {FluidName: "chroma", Amount: 1000}}).onlyWithTag({Fluid: {FluidName: "chroma"}}).marked("drum")],
  function (output, inputs, crafting) {
    var enchs = inputs.book.tag.StoredEnchantments;
    if enchs.length < 1 {
      return inputs.book;
    } else {
      var level = enchs[0].lvl + 1;
      if inputs.drum.tag.Fluid.Amount < level * 1000 {
        crafting.player.sendChat("Not Enough Chroma");
        crafting.player.give(<minecraft:stick>.withTag({lvl: level * 1000, amt: inputs.drum.tag.Fluid.Amount}));
      } else {
        var amount = inputs.drum.tag.Fluid.Amount - level * 1000;
        var drum = <ExtraUtilities:drum>;
        if inputs.drum.tag.Fluid.Amount > level * 1000 {
          drum = drum.withTag({Fluid: {FluidName: "chroma", Amount: amount}});
        }
        return drum;
        return <minecraft:enchanted_book>.withTag({StoredEnchantments: [enchs[0].update({lvl:level})]});
      }
    }
    return inputs.book;
  }
);
 
W

welchdrew

Guest
So I am trying to set up a modtweaker script to allow making metallurgy alloys via induction smelter.

This is on 1.7.10

Here is the code I am trying to do to make damascus steel ingots, trying to use the oredictionary to not require a specific type of Bronze or Iron.
Code:
mods.thermalexpansion.Smelter.addRecipe(1600, <ore:dustIron>, <ore:dustBronze>, <Metallurgy:damascus.steel.ingot>);
mods.thermalexpansion.Smelter.addRecipe(2400, <ore:ingotIron>, <ore:ingotBronze>, <Metallurgy:damascus.steel.ingot>);

But when I do the /mt reload command it gives me this error and fails to function.
error.png


I am using the latest version of 1.7.10 CraftTweaker and ModTweaker.
I tried this with another recipe earlier using the oredictionary, but it seems that if I ever try to make recipes with the oredictionary I get this error, but using specific items is fine.

Any help?

EDIT: Never Mind, it seems that when you just use the items in the custom recipes, thermal expansion automatically makes them oredictionary recipes.
 
Last edited:
R

Runesong

Guest
Hey all, happy to finally find a support forum on this subject with replies from this year. Hopefully someone will still be around :)

I have a 1.7.10 modpack that's been my off-again on-again personal project for a while. There are just so many nice mods for 1.7.10. Unfortunately, a few of those very nice mods were left a bit unfinished before being abandoned for future versions. Se la vie. And yay for Minetweaker.

I've been working on balancing, consistency, and personal preference for the 1.7.10 cooking recipes in Pam's Harvestcraft, including requiring baking for all the different kinds of bread. I want to make the single Dough item from the mod act like several different types of Dough that each yield different bread products from the Furnace when baked. I've been trying to achieve this using .withTag and .onlyWithTag, letting you create dough types with their own Names and Lores to act as different individual versions.

My recipes for making the special dough using .withTag at the Crafting Table work fine. The Dough product gets its intended Name and unique Lore. I can also successfully make Crafting Table recipes work using .onlyWithTag and checking the Dough's Lore to get its corresponding bread product . . . but I don't want that step to happen on the Crafting Table; I want to use the Furnace.

That's not working so well. No matter which version of the Dough goes into the Furnace, the product is always the same single bread type for all Dough types, (including default.)

If my DoughOnly vals only use .onlyWithTag, then the bread that comes out is always the one in the very last Furnace recipe specified.

If they also include .withTag as in the excerpt below, then NEI will display the bread recipes (sort of,) and which single bread product all Doughs result in seems to change randomly every time I reload my scripts. I reload, all Dough types make the banana bread, reload again, they all make zucchini bread, reload again, now they all make ginger.

Does .onlyWithTag not work properly with Furnaces? Am I doing something else wrong? Is there another way to make one item act like several different versions in a Furnace? Do I have to upgrade to CraftTweaker? (I've tried, it makes things crash. If I can stick with what I've got, that would be preferred.)

Using MineTweaker 3.0.9C and ModTweaker 0.9.6 for 1.7.10.

Code:
// Fancy Bread Dough Differentiation
//==================================
//
import minetweaker.data.IData;
//
val dough = <harvestcraft:doughItem>;
// Pumpkin Bread
val pumpkinLore = ["Smells like pumpkin spice.", "It's really rather nice."] as IData;
val pumpkinTag = {display: {Name: "Pumpkin Bread Dough", Lore: pumpkinLore}} as IData;
val pumpkinOnlyTag = {display: {Lore: pumpkinLore}} as IData;
val pumpkinDough = dough.withTag(pumpkinTag);
val pumpkinDoughOnly = dough.withTag(pumpkinTag).onlyWithTag(pumpkinOnlyTag); // Extra .withTag for NEI purposes
val pumpkinBread = <harvestcraft:pumpkinbreadItem>;
recipes.addShapeless(pumpkinDough, [<harvestcraft:doughItem>, <ore:cropPumpkin>, <ore:listAllsugar>]); // TODO: add mixing bowl requirement
furnace.addRecipe(pumpkinBread, pumpkinDoughOnly);
// Gingerbread
val gingerLore = ["Smells cosy!"] as IData;
val gingerTag = {display: {Name: "Gingerbread Dough", Lore: gingerLore}} as IData;
val gingerOnlyTag = {display: {Lore: gingerLore}} as IData;
val gingerDough = dough.withTag(gingerTag);
val gingerDoughOnly = dough.withTag(gingerTag).onlyWithTag(gingerOnlyTag);
val gingerBread = <harvestcraft:gingerbreadItem>;
furnace.addRecipe(gingerBread, gingerDoughOnly);

And so on for all six special breads.
 

Golrith

Over-Achiever
Trusted User
Nov 11, 2012
3,834
2,137
248
Forgot about CustomItems (used to the 1.10 mod list :rolleyes:)- I'll second Custom over Quadrum, looks like you can do fluids and tools ect too
Do you happen to know of any mods for adding blocks in 1.12.2? I see Quadrum hasn't updated yet.
 
V

V1bes81

Guest
Hi all,

Iam trying understand the scripting of mineTweaker and I seem to be having a problem I cant figure out.

Here is the code I currently have, using minecraft 1.7.10 and craftTweaker 3.0.13

PHP:
import mods.nei.NEI;
import minetweaker.item.IItemStack;
import minetweaker.item.IIngredient;
import minetweaker.data.IData;
import minetweaker.oredict.IOreDictEntry;

var aaItems = ["Sword", "Shovel", "Axe", "Pickaxe", "Boots", "Pants", "Chest", "Helm", "Hoe"] as string[];
var aaMats = ["Emerald", "CrystalGreen", "CrystalWhite", "CrystalBlack", "CrystalBlue", "CrystalLightBlue", "CrystalRed", "Obsidian", "Quartz"] as string[];

for i, thisItem in aaItems {
   for j, thisMat in aaMats {
     var aaItem = "<ActuallyAdditions:item" + thisItem + thisMat + ">";
     recipes.remove(aaItem);
     NEI.hide(aaItem);
   }
}

What I want it to do is, Remove both the recipe and hide the item in NEI, I use 2 array strings to build the item name in a few loops. Including a print statment confirms aaItem is correct but here is the error I get.

Code:
INFO:
ERROR: aa.zs:11 > a method available but none matches the parameters (string)
This is usually an error in your script, not in the mod
ERROR: aa.zs:12 > a method available but none matches the parameters (string)
This is usually an error in your script, not in the mod

It seems I need to convert aaItem to IItemStack? but when I try this it fails with this error. (adding as IItemStack[] to the end of aaItem var)

Code:
ERROR: aa.zs:12 > Cannot cast string to minetweaker.item.IItemStack
ERROR: aa.zs:13 > a method available but none matches the parameters (minetweaker.item.IItemStack[])
This is usually an error in your script, not in the mod
ERROR: aa.zs:14 > a method available but none matches the parameters (minetweaker.item.IItemStack[])
This is usually an error in your script, not in the mod

My Question is can you do something like im trying to do? or am I just not doing it correctly? Or did I just totally not understand the use of variables in minetweaker?

TIA Shaun.
 
D

Dev. S.

Guest
Is there any way to add fluids to the carpenter? I want to add a recipe to use liquid xp and other fluids but it refuses to go in.
 
Last edited:

Golrith

Over-Achiever
Trusted User
Nov 11, 2012
3,834
2,137
248
Hi all,

Iam trying understand the scripting of mineTweaker and I seem to be having a problem I cant figure out.

Here is the code I currently have, using minecraft 1.7.10 and craftTweaker 3.0.13

PHP:
import mods.nei.NEI;
import minetweaker.item.IItemStack;
import minetweaker.item.IIngredient;
import minetweaker.data.IData;
import minetweaker.oredict.IOreDictEntry;

var aaItems = ["Sword", "Shovel", "Axe", "Pickaxe", "Boots", "Pants", "Chest", "Helm", "Hoe"] as string[];
var aaMats = ["Emerald", "CrystalGreen", "CrystalWhite", "CrystalBlack", "CrystalBlue", "CrystalLightBlue", "CrystalRed", "Obsidian", "Quartz"] as string[];

for i, thisItem in aaItems {
   for j, thisMat in aaMats {
     var aaItem = "<ActuallyAdditions:item" + thisItem + thisMat + ">";
     recipes.remove(aaItem);
     NEI.hide(aaItem);
   }
}

What I want it to do is, Remove both the recipe and hide the item in NEI, I use 2 array strings to build the item name in a few loops. Including a print statment confirms aaItem is correct but here is the error I get.

Code:
INFO:
ERROR: aa.zs:11 > a method available but none matches the parameters (string)
This is usually an error in your script, not in the mod
ERROR: aa.zs:12 > a method available but none matches the parameters (string)
This is usually an error in your script, not in the mod

It seems I need to convert aaItem to IItemStack? but when I try this it fails with this error. (adding as IItemStack[] to the end of aaItem var)

Code:
ERROR: aa.zs:12 > Cannot cast string to minetweaker.item.IItemStack
ERROR: aa.zs:13 > a method available but none matches the parameters (minetweaker.item.IItemStack[])
This is usually an error in your script, not in the mod
ERROR: aa.zs:14 > a method available but none matches the parameters (minetweaker.item.IItemStack[])
This is usually an error in your script, not in the mod

My Question is can you do something like im trying to do? or am I just not doing it correctly? Or did I just totally not understand the use of variables in minetweaker?

TIA Shaun.

Sorry, never used that method for adjusting items. I've always done it the "simple" way of declaring each item. Try that.


Is there any way to add fluids to the carpenter? I want to add a recipe to use liquid xp and other fluids but it refuses to go in.
Unfortunately the Forestry Carpenter only accepts Water, Creosote & Seed Oil. Being an old block those were pretty much the only fluids available back in those days.
 
V

V1bes81

Guest
Sorry, never used that method for adjusting items. I've always done it the "simple" way of declaring each item. Try that.



Unfortunately the Forestry Carpenter only accepts Water, Creosote & Seed Oil. Being an old block those were pretty much the only fluids available back in those days.

Thats basically what I did to start with but the script is long haha, I was hoping you could make it shorter but oh well the longer way is the quicker way as ive no idea how to make the short version work.
 

skull1

New Member
Jul 29, 2019
22
0
0
hello im trying to use this script to make the fluid transposer extract liquid dna from bees,but with no items on output, and i dont understand why it gives error:

Code:
mods.thermalexpansion.Transposer.addExtractRecipe(2400, <Forestry:beeDroneGE>,<liquid:liquiddna> * 10);

error: 2 methods available but none matches the parameters ()

but if i use a command like that:
Code:
mods.thermalexpansion.Transposer.addExtractRecipe(2400, <Forestry:beeDroneGE>,<liquid:liquiddna> * 10,<minecraft:stick>, 100);
it works but it gives a stick for every drone.
According to modtweaker wiki minetweaker3.powerofbytes.com/wiki/ModTweaker:Thermal_Expansion_Support the method is :
Code:
//InputRF, InputStack, InputFluid, OutputStack, Chance
mods.thermalexpansion.Transposer.addExtractRecipe(2000, <minecraft:leaves>, <liquid:water> * 50, <minecraft:stick>, 100);
but the last 2 parameters are optional.
there is also another recipe on the transposer that extract seed oil from seed so it should work,i dont see where is the error...