Future MC

Future MC

14M Downloads

[1.12.2] CRT OreDict cannot find item

joe-vettek opened this issue · 23 comments

commented

When I use oredict to modify the composter, it cannot match the leaf saplings of the forestry mod, nor can it match the item of the foodfunk mod. Only IItemStack works, but this is too much trouble. .

commented

Could you send an example CraftTweaker script for what you want to be able to accomplish?

commented

@joe-vettek oh it seems like I made a typo LOL whoops - I put Composer instead of Composter, which is why

I edited my original post to fix it

commented
commented

code

commented

Only the method I said before is effective. Some mod items need to specify ID and metadata to add. It is currently known that Forestry and Food Funk need to do this.

commented

mods.futuremc.Composter.addValidItem(<ore:treeLeaves>, 30); mods.futuremc.Composter.addValidItem(<ore:treeSapling>, 30);

The above is my code, in fact this doesn't work.

commented

When using CRT's native function to modify the recipe, OreDict can match these items (such as plankWood can match forestry plankwood). So I think the problem may lie with you.

commented

Thank you. At the same time, thank you very much for your work so that we can use these things in 1.12.2.

commented

By the way, it seems that remove can only fill in itemstack manually, not oredict. But if it is too much trouble, forget it.Also It is easy to produce multiple probabilities when using oredict.

commented

There is a weird thing here. If I set the probability to 30, it is displayed as 4 in jei. I don't know why.

commented

I'll look at it this weekend

commented

in the meantime, you can do something like this:

for item in <ore:treeLeaves>.items {
  mods.futuremc.Composter.addValidItem(item, 30);
}

but this is by no means a permanent solution

commented

I just tried it again. When I set the probability to 35, it is displayed as 32 in jei. If it is 65, it is displayed as 64. The previous setting is 30 and it is displayed as 4.I cna't understand why.

commented

val forestryLeaves = <forestry:leaves.decorative.1>.definition; for i in 0 to 15 { mods.futuremc.Composter.addValidItem(forestryLeaves.makeStack(i), 35); }
The method mentioned above seems to be useless, it will report an error and can only be added with metadata.

commented

what error

commented

A bunch of numbers will come out, I don’t know what it means.

commented

you have to upload your crafttweaker.log

commented

I'll try, because I can't find my script.

commented

//// mods.futuremc.Composter.addValidItem(IItemStack item, int chance);

//foodfunk
//mods.futuremc.Composter.addValidItem(foodfunk:rotten_food:0, 100);
//mods.futuremc.Composter.addValidItem(foodfunk:biodegradable_item:0, 100);

//sakura
//mods.futuremc.Composter.addValidItem(sakura:foodset, 85);

//forestry
mods.futuremc.Composter.addValidItem(ore:fruitForestry, 65);
mods.futuremc.Composter.addValidItem(forestry:sapling:0, 35);
mods.futuremc.Composter.addValidItem(botany:itemflower:0, 65);
mods.futuremc.Composter.addValidItem(forestry:leaves.decorative.2:0, 35);
mods.futuremc.Composter.addValidItem(forestry:leaves.decorative.2:1, 35);
mods.futuremc.Composter.addValidItem(forestry:leaves.decorative.2:2, 35);
mods.futuremc.Composter.addValidItem(extratrees:leaves.decorative.6:0, 35);

val botanyPlant = botany:plant.definition;
for i in 0 to 4 {
mods.futuremc.Composter.addValidItem(botanyPlant.makeStack(i), 35);}

val extratreesFood = extratrees:food.definition;
for i in 0 to 59 {
mods.futuremc.Composter.addValidItem(extratreesFood.makeStack(i), 65);}

val forestryLeaves = forestry:leaves.decorative.1.definition;
val extratreesLeaves0 = extratrees:leaves.decorative.0.definition;
val extratreesLeaves1 = extratrees:leaves.decorative.1.definition;
val extratreesLeaves2 = extratrees:leaves.decorative.2.definition;
val extratreesLeaves3 = extratrees:leaves.decorative.3.definition;
val extratreesLeaves4 = extratrees:leaves.decorative.4.definition;
val extratreesLeaves5 = extratrees:leaves.decorative.5.definition;
for i in 0 to 15 {
mods.futuremc.Composter.addValidItem(forestryLeaves.makeStack(i), 35);
mods.futuremc.Composter.addValidItem(extratreesLeaves0.makeStack(i), 35);
mods.futuremc.Composter.addValidItem(extratreesLeaves1.makeStack(i), 35);
mods.futuremc.Composter.addValidItem(extratreesLeaves2.makeStack(i), 35);
mods.futuremc.Composter.addValidItem(extratreesLeaves3.makeStack(i), 35);
mods.futuremc.Composter.addValidItem(extratreesLeaves4.makeStack(i), 35);
mods.futuremc.Composter.addValidItem(extratreesLeaves5.makeStack(i), 35);

}

//

//ore

mods.futuremc.Composter.addValidItem(ore:listAllveggie, 65);
mods.futuremc.Composter.addValidItem(ore:listAllfruit, 65);
mods.futuremc.Composter.addValidItem(ore:listAllSeed, 65);
mods.futuremc.Composter.addValidItem(ore:treeLeaves, 35);
mods.futuremc.Composter.addValidItem(ore:treeSapling, 35);
mods.futuremc.Composter.addValidItem(ore:plant, 65);

//PMP
//mods.futuremc.Composter.addValidItem(ore:foodBerry, 65);
//mods.futuremc.Composter.addValidItem(ore:foodFruit, 65);
//mods.futuremc.Composter.addValidItem(ore:foodNut, 65);
//mods.futuremc.Composter.addValidItem(ore:foodVegetable, 65);

commented

It works.

commented

Should I close the issue?

commented

if it works, then i suppose so

commented

I'm broadening the CraftTweaker functions to use all IIngredient, so IOreIngredient and IItemStack should work for the same functions now.