aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/plugin/smoker
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2019-01-07 13:33:08 +0800
committerUnknown <shekwancheung0528@gmail.com>2019-01-07 13:33:08 +0800
commitea9421a3b7c7eec1fbe829ebe749acccdb4ef495 (patch)
tree47f78f2b117fe9e1383bc2845775bfed5cca7761 /src/main/java/me/shedaniel/plugin/smoker
parent1eefa6a30341086d50858aa4faa88eade408149a (diff)
downloadRoughlyEnoughItems-ea9421a3b7c7eec1fbe829ebe749acccdb4ef495.tar.gz
RoughlyEnoughItems-ea9421a3b7c7eec1fbe829ebe749acccdb4ef495.tar.bz2
RoughlyEnoughItems-ea9421a3b7c7eec1fbe829ebe749acccdb4ef495.zip
Tooltip
Diffstat (limited to 'src/main/java/me/shedaniel/plugin/smoker')
-rwxr-xr-xsrc/main/java/me/shedaniel/plugin/smoker/VanillaSmokerCategory.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/me/shedaniel/plugin/smoker/VanillaSmokerCategory.java b/src/main/java/me/shedaniel/plugin/smoker/VanillaSmokerCategory.java
index 862d5ba35..37bd413f4 100755
--- a/src/main/java/me/shedaniel/plugin/smoker/VanillaSmokerCategory.java
+++ b/src/main/java/me/shedaniel/plugin/smoker/VanillaSmokerCategory.java
@@ -1,7 +1,6 @@
package me.shedaniel.plugin.smoker;
import me.shedaniel.api.DisplayCategoryCraftable;
-import me.shedaniel.api.IDisplayCategory;
import me.shedaniel.gui.RecipeGui;
import me.shedaniel.gui.widget.Control;
import me.shedaniel.gui.widget.REISlot;
@@ -12,7 +11,6 @@ import net.minecraft.block.Blocks;
import net.minecraft.block.entity.SmokerBlockEntity;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.Gui;
-import net.minecraft.client.gui.container.FurnaceGui;
import net.minecraft.client.gui.container.SmokerGui;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.item.Item;
@@ -111,7 +109,11 @@ public class VanillaSmokerCategory implements DisplayCategoryCraftable<VanillaSm
@Override
public void registerAutoCraftButton(List<Control> control, RecipeGui recipeGui, Gui parentGui, VanillaSmokerRecipe recipe, int number) {
- SmallButton button = new SmallButton(128, 75 + 6 + 26 + number * 75, 10, 10, "+");
+ SmallButton button = new SmallButton(128, 75 + 6 + 26 + number * 75, 10, 10, "+", enabled -> {
+ if (!(parentGui instanceof SmokerGui))
+ return I18n.translate("text.auto_craft.wrong_gui");
+ return "";
+ });
button.setOnClick(mouse -> {
recipeGui.close();
MinecraftClient.getInstance().openGui(parentGui);