Slimefun

Slimefun

3M Downloads

Machines find it difficult to find recipes for similar items

lijinhong11 opened this issue · 12 comments

commented

❗ Checklist

  • I am using the official english version of Slimefun and did not modify the jar.
  • I am using an up to date "DEV" (not "RC") version of Slimefun.
  • I am aware that issues related to Slimefun addons need to be reported on their bug trackers and not here.
  • I searched for similar open issues and could not find an existing bug report on this.

📍 Description

When I was testing my addon, I found this problem. And, the bug has existed for more than 5 months.

If a recipe needs [64,32] (total 64+32 = 96 items), the machine(s) can't find the recipe, but I place the items like [32,64], it works.
However, it still can find the recipe, but if you place items like [64,64], machine(s) can't find the recipe again.

📑 Reproduction Steps

1.The recipe needs items that amount >64 (but not a multiple of 64)
2.place similar items like [64,64] in machines' input slots
3.Machines doesn't take items

💡 Expected Behavior

The machines will take 96 items and there's only 32 items in the input slots

📷 Screenshots / Videos

653ee832166478c65b426b5625b1d258
12be32879ac2d7f4293ef94d9ba62c0a

QQ2024331-125914.mp4

📜 Server Log

No response

📂 /error-reports/ folder

No response

💻 Server Software

Paper

🎮 Minecraft Version

1.20.x

⭐ Slimefun version

d3c1b819574d70c7f6b1579e3f899559

🧭 Other plugins

Slimefun and its addons

commented

We're going to need some more programming specifics, what class are you using for this, I'm assuming AContainer but you need to specify. Those kinds of things. Excerpts of code would also make this a much easier process.

commented

We're going to need some more programming specifics, what class are you using for this, I'm assuming AContainer but you need to specify. Those kinds of things. Excerpts of code would also make this a much easier process.

the class extends AContainer and actually i don't rewrite the findNextRecipe method

commented

In fact, the recipe cannot be set to two identical items in different positions, such as 1 diamond and 1 diamond, perhaps this is not related to the required quantity?

commented

You should make a pr

commented

This seems to be an issue with an addon.
Im pretty sure the basic acontainer doesnt support more then 64 items for recipes.
Do you have a example plugin where you tested this with?

commented

is this an addon you created?

commented

This seems to be an issue with an addon.

Im pretty sure the basic acontainer doesnt support more then 64 items for recipes.

Do you have a example plugin where you tested this with?

It supports [64,64]

commented

The issue is that the acontainer doesn't pick the "best" item stack for the recipe input, it picks the first that works, which means that if it's in a different order in the machine, it won't work

commented

is this an addon you created?

YES, and it is like SlimeCustomizer BUT I DONT MODIFY AContainer#findNextRecipe()

THE METHOD IS THE REAL PROBLEM

Also, for Justin, You should stack amount of similar items. That input like [1,1] can work too

commented

YES, and it is like SlimeCustomizer BUT I DONT MODIFY AContainer#findNextRecipe()

THE METHOD IS THE REAL PROBLEM

Also, for Justin, You should stack amount of similar items. That input like [1,1] can work too

No need for the caps we understood it the first time when you said to earlier. And yeah [1,1] working doesn't surprise me since both would have the "best" match as long as the type/nbt was correct. However I have a feeling that it would not work if the machine only had [2,0] in it with a recipe of [1,1]

commented

YES, and it is like SlimeCustomizer BUT I DONT MODIFY AContainer#findNextRecipe()
THE METHOD IS THE REAL PROBLEM
Also, for Justin, You should stack amount of similar items. That input like [1,1] can work too

No need for the caps we understood it the first time when you said to earlier. And yeah [1,1] working doesn't surprise me since both would have the "best" match as long as the type/nbt was correct. However I have a feeling that it would not work if the machine only had [2,0] in it with a recipe of [1,1]

I saw someone use [4,4] and two input slots are far away lol

commented

Bump for let #4177 being reviewed