diff options
| author | shedaniel <daniel@shedaniel.me> | 2020-01-02 14:31:16 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2020-01-02 14:31:16 +0800 |
| commit | 5e2eccadbd91171c01cdb209d1338bcfb7786b1c (patch) | |
| tree | 6c7387de5baea8b335e8abe58651018f77ad2d41 /src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java | |
| parent | e8714fe8fc1dcaec7ad299c63e2b657870c8fb40 (diff) | |
| download | RoughlyEnoughItems-5e2eccadbd91171c01cdb209d1338bcfb7786b1c.tar.gz RoughlyEnoughItems-5e2eccadbd91171c01cdb209d1338bcfb7786b1c.tar.bz2 RoughlyEnoughItems-5e2eccadbd91171c01cdb209d1338bcfb7786b1c.zip | |
3.3
Fix #58
Close #134
Close #158
Fix #227
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java index fc318345e..5f9e876e1 100644 --- a/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java +++ b/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java @@ -28,19 +28,19 @@ import java.util.List; import java.util.Map; public class PreRecipeViewingScreen extends Screen { - + private static final Identifier IDENTIFIER = new Identifier("roughlyenoughitems", "textures/gui/screenshot.png"); private final List<Widget> widgets; private boolean original; private Map<RecipeCategory<?>, List<RecipeDisplay>> map; - + public PreRecipeViewingScreen(Map<RecipeCategory<?>, List<RecipeDisplay>> map) { super(new TranslatableText("text.rei.recipe_screen_type.selection")); this.widgets = Lists.newArrayList(); this.original = true; this.map = map; } - + @Override protected void init() { this.children.clear(); @@ -57,7 +57,7 @@ public class PreRecipeViewingScreen extends Screen { this.widgets.add(new ScreenTypeSelection(width / 2 + 5, height / 2 - 112 / 2 - 10, 112)); this.children.addAll(widgets); } - + @Override public void render(int int_1, int int_2, float float_1) { this.renderBackground(); @@ -72,7 +72,7 @@ public class PreRecipeViewingScreen extends Screen { widget.render(int_1, int_2, float_1); } } - + @Override public boolean keyPressed(int int_1, int int_2, int int_3) { if ((int_1 == 256 || this.minecraft.options.keyInventory.matchesKey(int_1, int_2)) && this.shouldCloseOnEsc()) { @@ -82,23 +82,23 @@ public class PreRecipeViewingScreen extends Screen { } return super.keyPressed(int_1, int_2, int_3); } - + public class ScreenTypeSelection extends WidgetWithBounds { - + private Rectangle bounds; private int u, v; - + public ScreenTypeSelection(int x, int y, int v) { this.bounds = new Rectangle(x - 4, y - 4, 208, 120); this.u = 0; this.v = v; } - + @Override public Rectangle getBounds() { return bounds; } - + @Override public void render(int i, int i1, float delta) { MinecraftClient.getInstance().getTextureManager().bindTexture(IDENTIFIER); @@ -110,7 +110,7 @@ public class PreRecipeViewingScreen extends Screen { fillGradient(bounds.x + bounds.width - 2, bounds.y, bounds.x + bounds.width, bounds.y + bounds.height, 0xFFFFFFFF, 0xFFFFFFFF); } } - + @Override public boolean mouseClicked(double double_1, double double_2, int int_1) { if (containsMouse(double_1, double_2)) { @@ -120,7 +120,7 @@ public class PreRecipeViewingScreen extends Screen { } return false; } - + @Override public List<? extends Element> children() { return Collections.emptyList(); |
