diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2018-12-30 20:10:36 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2018-12-30 20:10:36 +0800 |
| commit | 3e1f4333a51513b440b32adfe9b698590fbf76f5 (patch) | |
| tree | cf337b4e12df85cd30d25721bab6c1ba1f4591f8 /src/main/java/me/shedaniel/plugin/crafting | |
| parent | 814e2e94ad643f04576ab0569c4b94f96b275f51 (diff) | |
| download | RoughlyEnoughItems-3e1f4333a51513b440b32adfe9b698590fbf76f5.tar.gz RoughlyEnoughItems-3e1f4333a51513b440b32adfe9b698590fbf76f5.tar.bz2 RoughlyEnoughItems-3e1f4333a51513b440b32adfe9b698590fbf76f5.zip | |
Better stuff
Diffstat (limited to 'src/main/java/me/shedaniel/plugin/crafting')
| -rwxr-xr-x | src/main/java/me/shedaniel/plugin/crafting/VanillaCraftingCategory.java | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/main/java/me/shedaniel/plugin/crafting/VanillaCraftingCategory.java b/src/main/java/me/shedaniel/plugin/crafting/VanillaCraftingCategory.java index e064f05a4..1c37ed292 100755 --- a/src/main/java/me/shedaniel/plugin/crafting/VanillaCraftingCategory.java +++ b/src/main/java/me/shedaniel/plugin/crafting/VanillaCraftingCategory.java @@ -1,11 +1,14 @@ package me.shedaniel.plugin.crafting; import me.shedaniel.api.IDisplayCategory; -import me.shedaniel.gui.widget.AEISlot; +import me.shedaniel.gui.widget.REISlot; import me.shedaniel.gui.widget.Control; import me.shedaniel.gui.widget.WidgetArrow; import net.minecraft.client.MainWindow; import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.I18n; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import java.util.ArrayList; @@ -23,7 +26,7 @@ public class VanillaCraftingCategory implements IDisplayCategory<VanillaCrafting @Override public String getDisplayName() { - return "Crafting"; + return I18n.format("category.rei.crafting"); } @Override @@ -39,13 +42,13 @@ public class VanillaCraftingCategory implements IDisplayCategory<VanillaCrafting } @Override - public List<AEISlot> setupDisplay(int number) { - List<AEISlot> slots = new LinkedList<>(); + public List<REISlot> setupDisplay(int number) { + List<REISlot> slots = new LinkedList<>(); int count = 0; List<List<ItemStack>> input = recipes.get(number).getInput(); for(int y = 0; y < 3; y++) { for(int x = 0; x < 3; x++) { - AEISlot slot = new AEISlot(20 + x * 18, 75 + y * 18 + number * 75); + REISlot slot = new REISlot(20 + x * 18, 75 + y * 18 + number * 75); slot.setDrawBackground(true); slots.add(slot); count++; @@ -58,7 +61,7 @@ public class VanillaCraftingCategory implements IDisplayCategory<VanillaCrafting } else if (!input.get(i).isEmpty()) slots.get(i).setStackList(input.get(i)); } - AEISlot slot = new AEISlot(130, 75 + 18 + number * 75); + REISlot slot = new REISlot(130, 75 + 18 + number * 75); slot.setDrawBackground(true); slot.setStack(recipes.get(number).getOutput().get(0).copy()); @@ -103,4 +106,10 @@ public class VanillaCraftingCategory implements IDisplayCategory<VanillaCrafting } return num; } + + @Override + public ItemStack getCategoryIcon() { + return new ItemStack(Blocks.CRAFTING_TABLE.asItem()); + } + } |
