stop switching items in sc manual when shift key is held
@@ -4,6 +4,7 @@ import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.components.Widget;
+import net.minecraft.client.gui.screens.Screen;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.Ingredient;
@@ -26,6 +27,8 @@ public class IngredientDisplay implements Widget {
return;
Minecraft.getInstance().getItemRenderer().renderAndDecorateItem(stacks[currentRenderingStack], x, y);
+
+ if (!Screen.hasShiftDown()) {
ticksToChange -= partialTick;
if (ticksToChange <= 0) {
@@ -35,6 +38,7 @@ public class IngredientDisplay implements Widget {
ticksToChange = DISPLAY_LENGTH;
}
}
+ }
public void setIngredient(Ingredient ingredient) {
stacks = ingredient.getItems();
