Pollen

Pollen

4M Downloads

[1.18.2] Pollen 1.6.0 breaks a grindstone

KiyoGawaKG opened this issue ยท 3 comments

commented

What version are you seeing the problem on?

1.18.2

Describe the issue

When i want to remove enchantments from any item on the grindstone, I can't do it.

latest.log

[Render thread/ERROR]: Found a broken recipe, failed to setRecipe with RecipeLayoutBuilder: Minecraft minecraft:disenchant_netherite_chestplate class gg.moonflower.pollen.api.crafting.grindstone.PollenShapelessGrindstoneRecipe
commented

I posted a "fix" to moonflower's Discord server yesterday, but haven't yet received a response.

https://github.com/MoonflowerTeam/pollen/blob/1.18.x/common/src/main/java/gg/moonflower/pollen/core/mixin/GrindstoneMenuMixin.java#L65

I changed the != on this line to ==.

That fixed the grindstone itself, but not the JEI integration - JEI's grindstone recipes remain blank.

commented

[12:25:25] [Render thread/ERROR]: Error caught from Recipe Category: pollen:grindstone
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at java.util.Arrays$ArrayList.get(Arrays.java:4165) ~[?:?]
at net.minecraft.core.NonNullList.get(NonNullList.java:47) ~[client-1.18.2-20220404.173914-srg.jar%2362!/:?]
at gg.moonflower.pollen.core.forge.compat.jei.PollenGrindstoneCategory.setRecipe(PollenGrindstoneCategory.java:81) ~[pollen-forge-1.6.0+1.18.2.jar%2361!/:?]
at gg.moonflower.pollen.core.forge.compat.jei.PollenGrindstoneCategory.setRecipe(PollenGrindstoneCategory.java:31) ~[pollen-forge-1.6.0+1.18.2.jar%2361!/:?]

This is a part of the exception. It is ArrayIndexOutOfBoundsException. The index of the ingredients list is out of range. So I think we can replace create() in line 41 of PollenShapelessGrindstoneRecipe.java with createWithCapacity (2). Due to some packaging problems, I can't test this fix, but maybe it can fix jei's blank problemThis is my suggestion.
commented

Fixed in 1.6.1