aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/gui/RecipeGui.java
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2019-01-08 18:23:00 +0800
committerUnknown <shekwancheung0528@gmail.com>2019-01-08 18:23:00 +0800
commit4c175cf8a0f02dc3c4ef4e0c92eaa54f4e0bafd5 (patch)
tree468a1d03c3a7295b43f28e71b84856a512e72b3f /src/main/java/me/shedaniel/gui/RecipeGui.java
parenteea47c59b58b000e0a3d329102c7a26c67e37039 (diff)
downloadRoughlyEnoughItems-4c175cf8a0f02dc3c4ef4e0c92eaa54f4e0bafd5.tar.gz
RoughlyEnoughItems-4c175cf8a0f02dc3c4ef4e0c92eaa54f4e0bafd5.tar.bz2
RoughlyEnoughItems-4c175cf8a0f02dc3c4ef4e0c92eaa54f4e0bafd5.zip
Craftable Only WIP
Diffstat (limited to 'src/main/java/me/shedaniel/gui/RecipeGui.java')
-rwxr-xr-xsrc/main/java/me/shedaniel/gui/RecipeGui.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/me/shedaniel/gui/RecipeGui.java b/src/main/java/me/shedaniel/gui/RecipeGui.java
index 11731b120..7e6acdef9 100755
--- a/src/main/java/me/shedaniel/gui/RecipeGui.java
+++ b/src/main/java/me/shedaniel/gui/RecipeGui.java
@@ -1,7 +1,7 @@
package me.shedaniel.gui;
import com.mojang.blaze3d.platform.GlStateManager;
-import me.shedaniel.api.DisplayCategoryCraftable;
+import me.shedaniel.api.IDisplayCategoryCraftable;
import me.shedaniel.api.IDisplayCategory;
import me.shedaniel.api.IRecipe;
import me.shedaniel.gui.widget.Button;
@@ -166,12 +166,12 @@ public class RecipeGui extends ContainerGui {
List<Control> newControls = new LinkedList<>();
selectedCategory.addWidget(newControls, 0);
- if (selectedCategory instanceof DisplayCategoryCraftable)
- ((DisplayCategoryCraftable) selectedCategory).registerAutoCraftButton(newControls, this, getPrevScreen(), recipe, 0);
+ if (selectedCategory instanceof IDisplayCategoryCraftable)
+ ((IDisplayCategoryCraftable) selectedCategory).registerAutoCraftButton(newControls, this, getPrevScreen(), recipe, 0);
if (recipes.get(selectedCategory).size() >= recipePointer + 2) {
selectedCategory.addWidget(newControls, 1);
- if (selectedCategory instanceof DisplayCategoryCraftable)
- ((DisplayCategoryCraftable) selectedCategory).registerAutoCraftButton(newControls, this, getPrevScreen(), recipes.get(selectedCategory).get(recipePointer + 1), 1);
+ if (selectedCategory instanceof IDisplayCategoryCraftable)
+ ((IDisplayCategoryCraftable) selectedCategory).registerAutoCraftButton(newControls, this, getPrevScreen(), recipes.get(selectedCategory).get(recipePointer + 1), 1);
}
newControls.forEach(f -> f.move(left, top));
controls.addAll(newControls);
@@ -283,4 +283,5 @@ public class RecipeGui extends ContainerGui {
private int getTotalPages() {
return MathHelper.clamp(riseDoublesToInt(recipes.get(selectedCategory).size() / 2d), 1, Integer.MAX_VALUE);
}
+
}