From be7b641955a197d55251c3cbd4a314476cf94fb3 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Thu, 30 Apr 2020 01:08:07 +0800 Subject: Update to 20w18a and add recipe exporter Signed-off-by: shedaniel --- src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java') diff --git a/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java index 87c134700..cdb4eb1cc 100644 --- a/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java +++ b/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java @@ -342,7 +342,7 @@ public class RecipeViewingScreen extends Screen implements RecipeScreen { preWidgets.add(workingStationsBaseWidget = Widgets.createCategoryBase(new Rectangle(xx - 5, yy - 5, 15 + innerWidth * 16, 10 + actualHeight * 16))); preWidgets.add(Widgets.createSlotBase(new Rectangle(xx - 1, yy - 1, innerWidth * 16 + 2, actualHeight * 16 + 2))); int index = 0; - List list = Collections.singletonList(new TranslatableText("text.rei.working_station").method_27692(Formatting.YELLOW)); + List list = Collections.singletonList(new TranslatableText("text.rei.working_station").formatted(Formatting.YELLOW)); xx += (innerWidth - 1) * 16; for (List workingStation : workingStations) { preWidgets.add(new WorkstationSlotWidget(xx, yy, CollectionUtils.map(workingStation, stack -> stack.copy().setting(EntryStack.Settings.TOOLTIP_APPEND_EXTRA, s -> list)))); @@ -436,12 +436,12 @@ public class RecipeViewingScreen extends Screen implements RecipeScreen { setZOffset(470); if (bounds.contains(mouseX, mouseY)) { fillGradient(matrices, bounds.x, bounds.y, bounds.getMaxX(), bounds.getMaxY(), 1744822402, 1744822402); - Text text = new TranslatableText("text.rei.release_export", export.getLocalizedName()); + Text text = new TranslatableText("text.rei.release_export", export.getLocalizedName().copy().getString()); VertexConsumerProvider.Immediate immediate = VertexConsumerProvider.immediate(Tessellator.getInstance().getBuffer()); matrices.push(); matrices.translate(0.0D, 0.0D, 480); Matrix4f matrix4f = matrices.peek().getModel(); - textRenderer.draw(text, bounds.getCenterX() - textRenderer.method_27525(text) / 2f, bounds.getCenterY() - 4.5f, 0xff000000, false, matrix4f, immediate, false, 0, 15728880); + textRenderer.draw(text, bounds.getCenterX() - textRenderer.getWidth(text) / 2f, bounds.getCenterY() - 4.5f, 0xff000000, false, matrix4f, immediate, false, 0, 15728880); immediate.draw(); matrices.pop(); } else { -- cgit