diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-01-08 18:23:00 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-01-08 18:23:00 +0800 |
| commit | 72e1653cbb38282f8dce59a00fb381e18bfc795d (patch) | |
| tree | 468a1d03c3a7295b43f28e71b84856a512e72b3f /src/main/java/me/shedaniel/gui/RecipeGui.java | |
| parent | 6d5101aad169bc5d4d8bcd638aee0d4ce71c120a (diff) | |
| download | RoughlyEnoughItems-72e1653cbb38282f8dce59a00fb381e18bfc795d.tar.gz RoughlyEnoughItems-72e1653cbb38282f8dce59a00fb381e18bfc795d.tar.bz2 RoughlyEnoughItems-72e1653cbb38282f8dce59a00fb381e18bfc795d.zip | |
Craftable Only WIP
Diffstat (limited to 'src/main/java/me/shedaniel/gui/RecipeGui.java')
| -rwxr-xr-x | src/main/java/me/shedaniel/gui/RecipeGui.java | 11 |
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); } + } |
