CraftTweaker

CraftTweaker

151M Downloads

JEi displaying wrong recipe with onlyWithTag option

Saereth opened this issue ยท 8 comments

commented

Crafttweaker: CraftTweaker-1.10.2-3.0.15
JEI: jei_1.10.2-3.13.6.391

if I do a recipe like
recipes.addShaped(mekanism:EnergyCube.withTag({tier: 0}), [[ore:alloyBasic, ic2:re_battery:26, ore:alloyBasic], [ic2:cable:2.onlyWithTag({type: 2 as byte, insulation: 2 as byte}), ic2:resource:12, ic2:cable:2.onlyWithTag({type: 2 as byte, insulation: 2 as byte})], [ore:alloyBasic, ic2:re_battery:26, ore:alloyBasic]]);

the ic2:cable:2.onlyWithTag({type: 2 as byte, insulation: 2 as byte}) (which is double insulated gold wiring) will show copper wire in JEI, although the recipe only works with double insulated gold as it should.
http://imgur.com/a/mpvbk

commented

Fixed in dev

commented

Should this change be reflected in the CraftTweaker-1.10.2-3.0.17 version? if so it's still not working
http://imgur.com/a/i3qIf

Those should be insulated cable, same recipe listed in this initial issue report.

commented

uh maybe @mezz has some insight here, since it was working in my dev version, using a diamond pickaxe as a test

commented

jei version 1.10.2-3.14.3.403 if that helps.

commented

Can confirm that this doesn't work.

I will add some more info, hope that helps:

https://pastebin.com/2sGdwqLy

I have two recipes, one that requires filled Fluid Tanks (Neotech) and one that requires filled Gas Tanks (Mekanism). If I use withTag the recipe is shown correctly in JEI but the recipe doesn't work as intended (obviously). If I use onlyWithTag the recipe is working correctly, but it shows empty fluid tanks / empty gas tanks instead. So, I thought, let's just work around that and concatenate both commands

.onlyWithTag().withTag() throws errors
Then I did .withTag().onlyWithTag() with the Fluid Tanks and hey, it worked flawlessly. So it did the same with the Gas Tanks and there it showed up in JEI, but the recipe wouldn't work and I don't understand why.

So, tl;dr: onlyWithTag() doesn't get shown in JEI properly, workaround with .withTag().onlyWithTag() works only sometimes.

MC 1.10.2
Forge 2254
Crafttweaker 3.0.24

commented

This issue also existed in the 1.7.10 version

commented

Use withTag instead, withOnlyTag is a condition checked during recipe crafting, so JEI doesn't know about it, so combine them both for JEI to display it as such

commented

Someone asked for an example of what needs doing

recipes.addShapeless("diamond", <minecraft:diamond>,[<minecraft:diamond_pickaxe>.withTag({ench: [{lvl: 3 as short, id: 35 as short}]}).onlyWithTag({ench: [{lvl: 3 as short, id: 35 as short}]})]);

is the script that I have in my dev environment
image