Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
704fd70
add new mixin recreating brewing stand shift click behavior
Socketlike Sep 14, 2026
0736c16
add new mixin recreating armor slots shift click behavior on pre 1.3.2
Socketlike Sep 14, 2026
67fac60
remove unnecessary extends and fix styling?
Socketlike Sep 14, 2026
5ed2fdd
remove unused imports
Socketlike Sep 14, 2026
ba8adb6
add mixins that recreates chest shift click behavior before b1.5
Socketlike Sep 14, 2026
5e928ad
move the 1.3.2 mixins to the 1.3.1 folder + add a mixin recreating th…
Socketlike Sep 14, 2026
a565369
make my mixins abstract (forgot, sorry)
Socketlike Sep 14, 2026
c49a4d8
styling + rename MixinItemPickerMenu to MixinCreativeModeInventoryScr…
Socketlike Sep 14, 2026
197b349
add a mixin replicating shift clicking item behavior in enchantment t…
Socketlike Sep 14, 2026
2c1a92e
wrapops begone
Socketlike Sep 14, 2026
0eec380
remove itempickermenu mixin
Socketlike Sep 14, 2026
1c76573
comment out the b1.5- click action canceler (for now)
Socketlike Sep 16, 2026
2477805
disable shift clicking in furnace, crafting menu and player inventory…
Socketlike Sep 16, 2026
dadb387
furnace fuel shift click whitelist for certain version ranges
Socketlike Sep 16, 2026
ba601f3
rename FurnaceFuels method names and remove its init
Socketlike Sep 16, 2026
d5ab994
move FurnaceFuels to v1_11 and stop using the Minecraft instance for …
Socketlike Sep 17, 2026
2370c3c
fix FurnaceFuels formatting
Socketlike Sep 17, 2026
2e74b5d
move the fuel whitelist to a new mixin
Socketlike Sep 17, 2026
5ddbb8a
remove the stray "ItemTags."
Socketlike Sep 17, 2026
1b53c80
remove the stray logger call (oops)
Socketlike Sep 17, 2026
a8af1c1
remove logs from FurnaceFuels lists
Socketlike Sep 17, 2026
98b5655
add furnace input shift click whitelist for 1.11.2-
Socketlike Sep 17, 2026
e7488ac
remove unused imports
Socketlike Sep 17, 2026
89d918f
fix slight oversight with the reverse ordering for chest shift click
Socketlike Sep 17, 2026
4ea0ef8
fix brewing stand shift click behavior of blaze powder in 1.11-
Socketlike Sep 18, 2026
9ef3024
new mixin disabling shift clicking ingredients into the ingredient sl…
Socketlike Sep 18, 2026
f3993ef
remove unused import
Socketlike Sep 18, 2026
3236028
new mixin disabling shift clicking in / out lapis slot before 1.8
Socketlike Sep 18, 2026
777523e
new mixin attempting to disable max craft (shift clicking on output) …
Socketlike Sep 18, 2026
9774c86
completely disable shift clicking on the crafting output slot on b1.6…
Socketlike Sep 18, 2026
3cbc365
only cancel negative slot num QUICK_MOVE container input on b1.4.5 an…
Socketlike Sep 19, 2026
ee45437
Merge branch 'ver/26.3' into ver/26.2
Socketlike Sep 19, 2026
f992bbe
Merge branch 'ver/26.3' into ver/26.2
Socketlike Sep 20, 2026
45d1c38
bring back PotionBrewing from 26.2
Socketlike Sep 20, 2026
2bf36b1
remove unused imports
Socketlike Sep 20, 2026
82308b1
Merge branch 'ver/26.3' into ver/26.2
Socketlike Sep 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import com.viaversion.viafabricplus.features.global.ResourcePackHeaderDiff;
import com.viaversion.viafabricplus.features.v1_11_1.Recipes1_11_2;
import com.viaversion.viafabricplus.features.v1_12_2.FootStepParticle1_12_2;
import com.viaversion.viafabricplus.features.v26_2.PotionBrewing26_2;
import com.viaversion.viafabricplus.util.network.SyncTasks;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import net.minecraft.client.Minecraft;
Expand Down Expand Up @@ -81,6 +82,7 @@ public static void onPostGameLoading() {
Recipes1_11_2.init();
ArmorHudEmulation1_8.init();
CPEAdditions.postInit();
PotionBrewing26_2.init();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
/*
* This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus
* Copyright (C) 2021-2026 the original authors
* - Florian Reuth <git@florianreuth.de>
* - RK_01/RaphiMC
* Copyright (C) 2023-2026 ViaVersion and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.viaversion.viafabricplus.features.v1_11;

import net.minecraft.core.Holder;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.tags.ItemTags;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.ItemLike;
import net.minecraft.world.level.block.Blocks;
import java.util.ArrayList;

public final class FurnaceFuels {

private static FurnaceFuels FUELS_1_11 = null;
private static FurnaceFuels FUELS_1_3_1 = null;
private static FurnaceFuels FUELS_1_2_5 = null;

private final ArrayList<Item> values;

private FurnaceFuels(final ArrayList<Item> values) {
this.values = values;
}

public boolean isFuel(final ItemStack itemStack) {
return this.values.contains(itemStack.getItem());
}

public static FurnaceFuels getFuels_1_11() {
if (FUELS_1_11 == null)
FUELS_1_11 = new FurnaceFuels.Builder()
.add(Items.LAVA_BUCKET)
.add(Blocks.COAL_BLOCK)
.add(Items.BLAZE_ROD)
.add(Items.COAL)
.add(Items.CHARCOAL)
.add(ItemTags.PLANKS)
.add(ItemTags.WOODEN_STAIRS)
.add(ItemTags.WOODEN_TRAPDOORS)
.add(ItemTags.WOODEN_PRESSURE_PLATES)
.add(ItemTags.WOODEN_FENCES)
.add(ItemTags.FENCE_GATES)
.add(Blocks.NOTE_BLOCK)
.add(Blocks.BOOKSHELF)
.add(Blocks.JUKEBOX)
.add(Blocks.CHEST)
.add(Blocks.TRAPPED_CHEST)
.add(Blocks.CRAFTING_TABLE)
.add(Blocks.DAYLIGHT_DETECTOR)
.add(ItemTags.BANNERS)
.add(Items.BOW)
.add(Items.FISHING_ROD)
.add(Blocks.LADDER)
.add(ItemTags.SIGNS)
.add(Items.WOODEN_SHOVEL)
.add(Items.WOODEN_SWORD)
.add(Items.WOODEN_SPEAR)
.add(Items.WOODEN_HOE)
.add(Items.WOODEN_AXE)
.add(Items.WOODEN_PICKAXE)
.add(ItemTags.WOODEN_DOORS)
.add(ItemTags.BOATS)
.add(ItemTags.WOOL)
.add(ItemTags.WOODEN_BUTTONS)
.add(Items.STICK)
.add(ItemTags.SAPLINGS)
.add(Items.BOWL)
.add(ItemTags.WOOL_CARPETS)
.remove(ItemTags.NON_FLAMMABLE_WOOD)
.build();

return FUELS_1_11;
}

public static FurnaceFuels getFuels_1_3_1() {
if (FUELS_1_3_1 == null)
FUELS_1_3_1 = new FurnaceFuels.Builder()
.add(Items.LAVA_BUCKET)
.add(Blocks.COAL_BLOCK)
.add(Items.BLAZE_ROD)
.add(Items.COAL)
.add(Items.CHARCOAL)
.add(ItemTags.PLANKS)
.add(ItemTags.WOODEN_STAIRS)
.add(ItemTags.WOODEN_TRAPDOORS)
.add(ItemTags.WOODEN_PRESSURE_PLATES)
.add(ItemTags.WOODEN_FENCES)
.add(ItemTags.FENCE_GATES)
.add(Blocks.NOTE_BLOCK)
.add(Blocks.BOOKSHELF)
.add(Blocks.JUKEBOX)
.add(Blocks.CHEST)
.add(Blocks.TRAPPED_CHEST)
.add(Blocks.CRAFTING_TABLE)
.add(Blocks.DAYLIGHT_DETECTOR)
.add(ItemTags.BANNERS)
.add(Items.BOW)
.add(Items.FISHING_ROD)
.add(Blocks.LADDER)
.add(Items.WOODEN_SHOVEL)
.add(Items.WOODEN_SWORD)
.add(Items.WOODEN_SPEAR)
.add(Items.WOODEN_HOE)
.add(Items.WOODEN_AXE)
.add(Items.WOODEN_PICKAXE)
.add(Items.STICK)
.add(ItemTags.SAPLINGS)
.add(Items.BOWL)
.remove(ItemTags.NON_FLAMMABLE_WOOD)
.build();

return FUELS_1_3_1;
}

public static FurnaceFuels getFuels_1_2_5() {
if (FUELS_1_2_5 == null)
FUELS_1_2_5 = new FurnaceFuels.Builder()
.add(Items.LAVA_BUCKET)
.add(Blocks.COAL_BLOCK)
.add(Items.BLAZE_ROD)
.add(Items.COAL)
.add(Items.CHARCOAL)
.add(ItemTags.PLANKS)
.add(ItemTags.WOODEN_STAIRS)
.add(ItemTags.WOODEN_TRAPDOORS)
.add(ItemTags.WOODEN_PRESSURE_PLATES)
.add(ItemTags.WOODEN_FENCES)
.add(ItemTags.FENCE_GATES)
.add(Blocks.NOTE_BLOCK)
.add(Blocks.BOOKSHELF)
.add(Blocks.JUKEBOX)
.add(Blocks.CHEST)
.add(Blocks.TRAPPED_CHEST)
.add(Blocks.CRAFTING_TABLE)
.add(Blocks.DAYLIGHT_DETECTOR)
.add(ItemTags.BANNERS)
.add(Items.BOW)
.add(Items.FISHING_ROD)
.add(Blocks.LADDER)
.add(Items.STICK)
.add(ItemTags.SAPLINGS)
.add(Items.BOWL)
.remove(ItemTags.NON_FLAMMABLE_WOOD)
.build();

return FUELS_1_2_5;
}

public static class Builder {

private final ArrayList<Item> values = new ArrayList<>();

public FurnaceFuels build() {
return new FurnaceFuels(this.values);
}

public FurnaceFuels.Builder remove(final TagKey<Item> tag) {
BuiltInRegistries.ITEM.get(tag).ifPresent(items -> {
for (Holder<Item> item : items) {
this.values.remove(item.value());
}
});
return this;
}

public FurnaceFuels.Builder add(final TagKey<Item> tag) {
BuiltInRegistries.ITEM.get(tag).ifPresent(items -> {
for (Holder<Item> item : items) {
this.values.add(item.value());
}
});
return this;
}

public FurnaceFuels.Builder add(final ItemLike itemLike) {
Item item = itemLike.asItem();
this.values.add(item);
return this;
}

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
/*
* This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus
* Copyright (C) 2021-2026 the original authors
* - Florian Reuth <git@florianreuth.de>
* - RK_01/RaphiMC
* Copyright (C) 2023-2026 ViaVersion and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.viaversion.viafabricplus.features.v26_2;

import net.minecraft.core.Holder;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.alchemy.Potion;
import net.minecraft.world.item.alchemy.Potions;
import net.minecraft.world.item.crafting.Ingredient;
import java.util.ArrayList;
import java.util.List;

public class PotionBrewing26_2 {
public static PotionBrewing26_2 INSTANCE = null;
private final List<PotionBrewing26_2.Mix<Potion>> potionMixes;
private final List<PotionBrewing26_2.Mix<Item>> containerMixes;

private PotionBrewing26_2(
final List<PotionBrewing26_2.Mix<Potion>> potionMixes, final List<PotionBrewing26_2.Mix<Item>> containerMixes
) {
this.potionMixes = potionMixes;
this.containerMixes = containerMixes;
}

public boolean isIngredient(final ItemStack ingredient) {
return this.isContainerIngredient(ingredient) || this.isPotionIngredient(ingredient);
}

public boolean isContainerIngredient(final ItemStack ingredient) {
for (PotionBrewing26_2.Mix<Item> containerMix : this.containerMixes) {
if (containerMix.ingredient.test(ingredient)) {
return true;
}
}

return false;
}

public boolean isPotionIngredient(final ItemStack ingredient) {
for (PotionBrewing26_2.Mix<Potion> potionMix : this.potionMixes) {
if (potionMix.ingredient.test(ingredient)) {
return true;
}
}

return false;
}

public static void init() {
if (INSTANCE != null) {
throw new IllegalStateException("PotionBrewing26_2 is already initialized");
}

PotionBrewing26_2.Builder builder = new PotionBrewing26_2.Builder();

builder.addContainerRecipe(Items.POTION, Items.GUNPOWDER, Items.SPLASH_POTION);
builder.addContainerRecipe(Items.SPLASH_POTION, Items.DRAGON_BREATH, Items.LINGERING_POTION);
builder.addMix(Potions.WATER, Items.GLOWSTONE_DUST, Potions.THICK);
builder.addMix(Potions.WATER, Items.REDSTONE, Potions.MUNDANE);
builder.addMix(Potions.WATER, Items.NETHER_WART, Potions.AWKWARD);
builder.addStartMix(Items.BREEZE_ROD, Potions.WIND_CHARGED);
builder.addStartMix(Items.SLIME_BLOCK, Potions.OOZING);
builder.addStartMix(Items.STONE, Potions.INFESTED);
builder.addStartMix(Items.COBWEB, Potions.WEAVING);
builder.addMix(Potions.AWKWARD, Items.GOLDEN_CARROT, Potions.NIGHT_VISION);
builder.addMix(Potions.NIGHT_VISION, Items.REDSTONE, Potions.LONG_NIGHT_VISION);
builder.addMix(Potions.NIGHT_VISION, Items.FERMENTED_SPIDER_EYE, Potions.INVISIBILITY);
builder.addMix(Potions.LONG_NIGHT_VISION, Items.FERMENTED_SPIDER_EYE, Potions.LONG_INVISIBILITY);
builder.addMix(Potions.INVISIBILITY, Items.REDSTONE, Potions.LONG_INVISIBILITY);
builder.addStartMix(Items.MAGMA_CREAM, Potions.FIRE_RESISTANCE);
builder.addMix(Potions.FIRE_RESISTANCE, Items.REDSTONE, Potions.LONG_FIRE_RESISTANCE);
builder.addStartMix(Items.RABBIT_FOOT, Potions.LEAPING);
builder.addMix(Potions.LEAPING, Items.REDSTONE, Potions.LONG_LEAPING);
builder.addMix(Potions.LEAPING, Items.GLOWSTONE_DUST, Potions.STRONG_LEAPING);
builder.addMix(Potions.LEAPING, Items.FERMENTED_SPIDER_EYE, Potions.SLOWNESS);
builder.addMix(Potions.LONG_LEAPING, Items.FERMENTED_SPIDER_EYE, Potions.LONG_SLOWNESS);
builder.addMix(Potions.SLOWNESS, Items.REDSTONE, Potions.LONG_SLOWNESS);
builder.addMix(Potions.SLOWNESS, Items.GLOWSTONE_DUST, Potions.STRONG_SLOWNESS);
builder.addMix(Potions.AWKWARD, Items.TURTLE_HELMET, Potions.TURTLE_MASTER);
builder.addMix(Potions.TURTLE_MASTER, Items.REDSTONE, Potions.LONG_TURTLE_MASTER);
builder.addMix(Potions.TURTLE_MASTER, Items.GLOWSTONE_DUST, Potions.STRONG_TURTLE_MASTER);
builder.addMix(Potions.SWIFTNESS, Items.FERMENTED_SPIDER_EYE, Potions.SLOWNESS);
builder.addMix(Potions.LONG_SWIFTNESS, Items.FERMENTED_SPIDER_EYE, Potions.LONG_SLOWNESS);
builder.addStartMix(Items.SUGAR, Potions.SWIFTNESS);
builder.addMix(Potions.SWIFTNESS, Items.REDSTONE, Potions.LONG_SWIFTNESS);
builder.addMix(Potions.SWIFTNESS, Items.GLOWSTONE_DUST, Potions.STRONG_SWIFTNESS);
builder.addMix(Potions.AWKWARD, Items.PUFFERFISH, Potions.WATER_BREATHING);
builder.addMix(Potions.WATER_BREATHING, Items.REDSTONE, Potions.LONG_WATER_BREATHING);
builder.addStartMix(Items.GLISTERING_MELON_SLICE, Potions.HEALING);
builder.addMix(Potions.HEALING, Items.GLOWSTONE_DUST, Potions.STRONG_HEALING);
builder.addMix(Potions.HEALING, Items.FERMENTED_SPIDER_EYE, Potions.HARMING);
builder.addMix(Potions.STRONG_HEALING, Items.FERMENTED_SPIDER_EYE, Potions.STRONG_HARMING);
builder.addMix(Potions.HARMING, Items.GLOWSTONE_DUST, Potions.STRONG_HARMING);
builder.addMix(Potions.POISON, Items.FERMENTED_SPIDER_EYE, Potions.HARMING);
builder.addMix(Potions.LONG_POISON, Items.FERMENTED_SPIDER_EYE, Potions.HARMING);
builder.addMix(Potions.STRONG_POISON, Items.FERMENTED_SPIDER_EYE, Potions.STRONG_HARMING);
builder.addStartMix(Items.SPIDER_EYE, Potions.POISON);
builder.addMix(Potions.POISON, Items.REDSTONE, Potions.LONG_POISON);
builder.addMix(Potions.POISON, Items.GLOWSTONE_DUST, Potions.STRONG_POISON);
builder.addStartMix(Items.GHAST_TEAR, Potions.REGENERATION);
builder.addMix(Potions.REGENERATION, Items.REDSTONE, Potions.LONG_REGENERATION);
builder.addMix(Potions.REGENERATION, Items.GLOWSTONE_DUST, Potions.STRONG_REGENERATION);
builder.addStartMix(Items.BLAZE_POWDER, Potions.STRENGTH);
builder.addMix(Potions.STRENGTH, Items.REDSTONE, Potions.LONG_STRENGTH);
builder.addMix(Potions.STRENGTH, Items.GLOWSTONE_DUST, Potions.STRONG_STRENGTH);
builder.addMix(Potions.WATER, Items.FERMENTED_SPIDER_EYE, Potions.WEAKNESS);
builder.addMix(Potions.WEAKNESS, Items.REDSTONE, Potions.LONG_WEAKNESS);
builder.addMix(Potions.AWKWARD, Items.PHANTOM_MEMBRANE, Potions.SLOW_FALLING);
builder.addMix(Potions.SLOW_FALLING, Items.REDSTONE, Potions.LONG_SLOW_FALLING);

INSTANCE = builder.build();
}

public static class Builder {
private final List<PotionBrewing26_2.Mix<Potion>> potionMixes = new ArrayList<>();
private final List<PotionBrewing26_2.Mix<Item>> containerMixes = new ArrayList<>();

public void addContainerRecipe(final Item from, final Item ingredient, final Item to) {
this.containerMixes.add(new PotionBrewing26_2.Mix<>(BuiltInRegistries.ITEM.wrapAsHolder(from), Ingredient.of(ingredient), BuiltInRegistries.ITEM.wrapAsHolder(to)));
}

public void addMix(final Holder<Potion> from, final Item ingredient, final Holder<Potion> to) {
this.potionMixes.add(new PotionBrewing26_2.Mix<>(from, Ingredient.of(ingredient), to));
}

public void addStartMix(final Item ingredient, final Holder<Potion> potion) {
this.addMix(Potions.WATER, ingredient, Potions.MUNDANE);
this.addMix(Potions.AWKWARD, ingredient, potion);
}

public PotionBrewing26_2 build() {
return new PotionBrewing26_2(List.copyOf(this.potionMixes), List.copyOf(this.containerMixes));
}
}

private record Mix<T>(Holder<T> from, Ingredient ingredient, Holder<T> to) {
}
}
Loading