Reputation: 45
I'm backporting a fix commit for the EasierCrafting mod (which assists quick or mass crafting) for 1.16.5 (or mod version 1.6.7). The fix didn't work as expected.
It should fix this issue: After crafting honey blocks from honey bottles, 4 empty bottles will be left in the input slots, which prevented from clicking & loading recipes, and no more honey blocks can be crafted unless they are manually moved away or screen is re-opened.
Therefore, the fix does this by sending 4 more clicks on each empty bottle after crafting, moving them back to inventory:
if (underMouse.getOutput().getItem() == Items.HONEY_BLOCK) { // underMouse is a recipe
slotClick(1, 0, SlotActionType.QUICK_MOVE); // slot 1, left click , quick move
slotClick(2, 0, SlotActionType.QUICK_MOVE);
slotClick(4, 0, SlotActionType.QUICK_MOVE);
if (gridSize == 2) { // 2*2 grid
slotClick(3, 0, SlotActionType.QUICK_MOVE);
} else { //3*3 grid
slotClick(5, 0, SlotActionType.QUICK_MOVE);
}
}
However, when backported to 1.16.5, it just didn't fix the issue - empty bottles are still in the input slots. I tried logging whether this if
condition become true, and yes, the code got executed, yet mysteriously hasn't observable effects.
I also tried this (for crafting tables), and it also doesn't work:
if (player.currentScreenHandler instanceof CraftingScreenHandler craftingScreenHandler) {
craftingScreenHandler.clearCraftingSlots();
}
I'm new to modding. I backport mainly because I have loads of shulker boxes of honey bottle to craft with, and doing it is painful. Is there anyway to fix this?
Update : Today I tested newer version of EasierCrafting for newer Minecraft (which has this fix) and it also has this issue. Seems that the author didn't fix this successfully either.
Upvotes: 1
Views: 29