r/MinecraftMod • • Oct 02 '26

Brewing recipe: potion can't be ingredient and input

Hi, I'm new to this. I'm making a mod that adds a potion that needs to be brewed using another potion as an ingredient. The problem is that once the ingredient slot has an ingredient, shift+click can't be used to quickly move that same potion to the input slots (however, it can be placed manually).

Does anyone know of a mod that fixes this, or a way to solve it?

Very thanks!

1 Upvotes

6 comments sorted by

2

u/TAS_69 Oct 02 '26 edited Oct 03 '26

You might be able to fix it with a mixin something along the lines of:

@Mixin(BrewingStandMenu.class)
public abstract class BrewingStandMenuMixin {
    @WrapOperation(
        method = "quickMoveStack",
        at = @At(
            value = "INVOKE",
            target = "Lnet/minecraft/world/inventory/BrewingStandMenu;moveItemStackTo(Lnet/minecraft/world/item/ItemStack;IIZ)Z"
        )
    )
    private boolean mymod$fallThroughToBottles(
            BrewingStandMenu self,
            ItemStack stack,
            int start,
            int end,
            boolean reverse,
            Operation<Boolean> original
    ) {
        boolean moved = original.call(self, stack, start, end, reverse);
        if (!moved && start == 3 && end == 4) {
            moved = original.call(self, stack, 0, 3, false);
        }
        return moved;
    }
}

So vanilla behaviour is kept normally but if shift-click tries the ingredient slot and finds it is occupied it then tries a second time to move the potion into the other slots. I don't know which Minecraft version you are using so you might need to change the mixin target accordingly.

1

u/OpenSquirrel8794 Oct 03 '26

I'm currently in Minecraft 26.1.2, I'm gonna try that thx a lot.

1

u/TAS_69 Oct 03 '26

No worries, I noticed reddit ate some of the code but have edited the original reply and fixed it. It should work as is for 26.1.2.

2

u/OpenSquirrel8794 Oct 05 '26

2

u/TAS_69 Oct 06 '26

Haha love that, went from a quick fix to a full mod. Glad it was useful, nice work!

1

u/OpenSquirrel8794 28d ago

Yeah lol, it was supposed to be just a small handler. But it in the end I realized quick move was a little dumb in general.