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

Machines find it difficult to find recipes for similar items #4166

Open
4 tasks done
lijinhong11 opened this issue Mar 31, 2024 · 12 comments
Open
4 tasks done

Machines find it difficult to find recipes for similar items #4166

lijinhong11 opened this issue Mar 31, 2024 · 12 comments
Labels
🐞 Bug Report A bug that needs to be fixed. 🎯 Needs testing This Issue needs to be tested by our team to see if it can be reproduced.

Comments

@lijinhong11
Copy link

❗ 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

@lijinhong11 lijinhong11 added 🎯 Needs testing This Issue needs to be tested by our team to see if it can be reproduced. 🐞 Bug Report A bug that needs to be fixed. labels Mar 31, 2024
@JustAHuman-xD
Copy link
Contributor

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.

@lijinhong11
Copy link
Author

lijinhong11 commented Mar 31, 2024

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

@balugaq
Copy link

balugaq commented Apr 5, 2024

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?

@J3fftw1
Copy link
Contributor

J3fftw1 commented Apr 14, 2024

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?

@Boomer-1
Copy link

is this an addon you created?

@JustAHuman-xD
Copy link
Contributor

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]

@JustAHuman-xD
Copy link
Contributor

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

@lijinhong11
Copy link
Author

lijinhong11 commented Apr 15, 2024

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

@JustAHuman-xD
Copy link
Contributor

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]

@lijinhong11
Copy link
Author

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

@J3fftw1
Copy link
Contributor

J3fftw1 commented Apr 18, 2024

You should make a pr

@lijinhong11
Copy link
Author

Bump for let #4177 being reviewed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Report A bug that needs to be fixed. 🎯 Needs testing This Issue needs to be tested by our team to see if it can be reproduced.
Projects
None yet
Development

No branches or pull requests

5 participants