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

Disabling some Slimefun items shifted some multiblocks recipe #3286

Closed
4 tasks done
variananora opened this issue Sep 26, 2021 · 8 comments · Fixed by #3795
Closed
4 tasks done

Disabling some Slimefun items shifted some multiblocks recipe #3286

variananora opened this issue Sep 26, 2021 · 8 comments · Fixed by #3795
Labels
🐞 Bug Report A bug that needs to be fixed. ✔ Resolved This Issue has been resolved.

Comments

@variananora
Copy link
Member

❗ 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

In this case I'll disable Stone Chunks from items.yml and try using Compressor

This also happened here: Slimefun-Addon-Community/ExoticGarden#210

I think this is because when registering recipe it didn't check for the disabled items.

recipes.add(new SlimefunItemStack(SlimefunItems.STONE_CHUNK, 4));
recipes.add(new ItemStack(Material.COBBLESTONE));
recipes.add(new ItemStack(Material.FLINT, 8));
recipes.add(new ItemStack(Material.COBBLESTONE));
recipes.add(new ItemStack(Material.COAL_BLOCK, 8));
recipes.add(new SlimefunItemStack(SlimefunItems.CARBON, 9));
recipes.add(new ItemStack(Material.CHARCOAL, 4));
recipes.add(new ItemStack(Material.COAL));

I haven't tried anything else but looking at things I think I can make this work one Ore Grinder and Ore Crusher too..

📑 Reproduction Steps

  1. Install Slimefun
  2. Disable Stone Chunks from items.yml
  3. Look at the guide, the recipe just got shifted
  4. Try using the compressor just using 1 coal
  5. It will output 8 coal

💡 Expected Behavior

The recipe should not be shifted.

📷 Screenshots / Videos

https://youtu.be/sgOPYilkLis

Side by side

Untitled

Normal Recipe

image

Shifted Recipe

image

📜 Server Log

No response

📂 /error-reports/ folder

No response

💻 Server Software

Paper

🎮 Minecraft Version

1.17.x

⭐ Slimefun version

> sf versions
[10:34:39 INFO]: This Server uses the following setup of Slimefun:
Paper git-Paper-279 (MC: 1.17.1)
Slimefun DEV - 974 (git 36c6d154)
Metrics-Module #28
Java 16

No Addons installed

🧭 Other plugins

No response

@variananora variananora added 🐞 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. labels Sep 26, 2021
@JustAHuman-xD
Copy link
Contributor

Is this still an issue?

@variananora
Copy link
Member Author

Is this still an issue?

yes it is.

@JustAHuman-xD
Copy link
Contributor

Is this still an issue?

yes it is.

Do you know if it only happens with multiblocks or if it also happens with things like machines and the ancient altar

@variananora
Copy link
Member Author

variananora commented Mar 2, 2023

just tested it and it only in multiblocks machine
it is not happening in ancient altar nor on machines.

Update: i think this is why it happens

if (item == null || !item.isDisabled()) {
recipes.add(new ItemStack[] { recipeItem });
}

This code checks for the item is disabled or not and added it to the recipe, thus making it shifted by 1 item.

This make sures the item is not able to be crafted or used as a crafting recipe.

image


Machines doesnt have this issue since it never check the item is disabled or not.

public void registerRecipe(int seconds, ItemStack[] input, ItemStack[] output) {
registerRecipe(new MachineRecipe(seconds, input, output));
}
public void registerRecipe(int seconds, ItemStack input, ItemStack output) {
registerRecipe(new MachineRecipe(seconds, new ItemStack[] { input }, new ItemStack[] { output }));
}

But because it never checks the item is disabled or not, it still works inside the machine if you still have the items.
(Not sure it will fit inside this issue or should be seperated to another issue.)

image


nor do ancient altar

image

@JustAHuman-xD
Copy link
Contributor

Alright thank you, think I know what is causing it now

@JustAHuman-xD
Copy link
Contributor

Alright sorry for the delay but think I made a fix for this, @variananora any chance you could test a jar? I'm not home so I can't test it and I won't be home for a couple days

@variananora
Copy link
Member Author

@variananora any chance you could test a jar?

yeah sure just ping me at discord for this things

@JustAHuman-xD
Copy link
Contributor

@variananora any chance you could test a jar?

yeah sure just ping me at discord for this things

Got it 👍

@ybw0014 ybw0014 mentioned this issue Jun 16, 2023
4 tasks
@variananora variananora added ✔ Resolved This Issue has been resolved. and removed 🎯 Needs testing This Issue needs to be tested by our team to see if it can be reproduced. labels Jul 1, 2023
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. ✔ Resolved This Issue has been resolved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants