Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Use Heated Ingredients in MineTweaker Anvil Recipes #16

Open
azacock opened this issue Oct 30, 2017 · 3 comments
Open

Cannot Use Heated Ingredients in MineTweaker Anvil Recipes #16

azacock opened this issue Oct 30, 2017 · 3 comments

Comments

@azacock
Copy link

azacock commented Oct 30, 2017

When adding recipes for the anvil with the MineTweaker hooks, I can't find a way to specify that metal components must be heated to a workable temperature. The boolean "hot" argument seems to just make the crafting result heated.

@Sirse
Copy link
Owner

Sirse commented Oct 30, 2017

Add script example, please

@azacock
Copy link
Author

azacock commented Oct 30, 2017

I've tried two scripts:

import mods.minefantasy.CustomMaterial;
import mods.minefantasy.MaterialExpansion;
import mods.minefantasy.Anvil;

CustomMaterial.addCustomMaterial("metal", "Atlarus", 0, 4.5, 6.0, 1.0, 4.0, 40.0, 2.5);
MaterialExpansion.setColor("Atlarus", 235, 244, 66);
MaterialExpansion.setMeltingPoint("Atlarus", 1200);
MaterialExpansion.setCrafterTiers("Atlarus",0);
MaterialExpansion.setRarity("Atlarus", -1);
MaterialExpansion.setUnbreakable("Atlarus");
MaterialExpansion.setArmourStats("Atlarus", 1.0, 0.2, 0.8);
MaterialExpansion.modifyCraftTime("Atlarus", 5.0);

val bar = <minefantasy2:custom_bar>.onlyWithTag({MF_CustomMaterials: {main_metal: "Atlarus"});

Anvil.addShapelessRecipe(<ExtraTiC:swordBlade:120>, "artisanry", "", true, 10.0, "hammer", 1, 1, 10, [bar, bar]);

The script technically works. If I place two (unheated) bars into the anvil, I can create the sword blade I want to craft. However, the problem is that the bars are unheated. I want to use heated bars in the recipe. Also, with this recipe, the sword blade that is created is not heated, and does not need to be quenched.

So, I tried this:

import mods.minefantasy.CustomMaterial;
import mods.minefantasy.MaterialExpansion;
import mods.minefantasy.Anvil;

CustomMaterial.addCustomMaterial("metal", "Atlarus", 0, 4.5, 6.0, 1.0, 4.0, 40.0, 2.5);
MaterialExpansion.setColor("Atlarus", 235, 244, 66);
MaterialExpansion.setMeltingPoint("Atlarus", 1200);
MaterialExpansion.setCrafterTiers("Atlarus",0);
MaterialExpansion.setRarity("Atlarus", -1);
MaterialExpansion.setUnbreakable("Atlarus");
MaterialExpansion.setArmourStats("Atlarus", 1.0, 0.2, 0.8);
MaterialExpansion.modifyCraftTime("Atlarus", 5.0);

val bar = <minefantasy2:MF_Hot_Item>.onlyWithTag({MFHeatable_ItemSave: {id: 7864, Count: 1, Damage: 0, tag: {MF_CustomMaterials: {main_metal: "Atlarus"}}}});

Anvil.addShapelessRecipe(<ExtraTiC:swordBlade:120>, "artisanry", "", true, 10.0, "hammer", 1, 1, 10, [bar, bar]);

There are two problems with this script. First is that it doesn't care about the material's workable temperature. If the bar is heated to any temperature at all, it will work in the recipe. Secondly (and I think this is a problem with the first script too, but I'm not sure), it seems that the anvil isn't properly understanding the NBT tag restriction, because I can use any heated bar in this recipe. Iron, copper, whatever, if I put two heated ingots in the anvil with this recipe, I can make an Atlarus Sword Blade. However, with this recipe, the resulting sword blade is hot, and must be quenched.

@Sirse
Copy link
Owner

Sirse commented Nov 1, 2017

Thx for feedback. I'm currently working under additional ZenExpansion methods for MF custom stacks (hot items, e.g.) for simple converting in MT scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants