diff options
| author | shedaniel <daniel@shedaniel.me> | 2020-04-30 01:08:07 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2020-04-30 02:27:38 +0800 |
| commit | be7b641955a197d55251c3cbd4a314476cf94fb3 (patch) | |
| tree | 1747230438e2daa7d8debd2f661a69ba11f4ea23 /src/main/java/me/shedaniel/rei/plugin | |
| parent | 43614d50fe2d965246b8ee4522f0ece646031ae9 (diff) | |
| download | RoughlyEnoughItems-be7b641955a197d55251c3cbd4a314476cf94fb3.tar.gz RoughlyEnoughItems-be7b641955a197d55251c3cbd4a314476cf94fb3.tar.bz2 RoughlyEnoughItems-be7b641955a197d55251c3cbd4a314476cf94fb3.zip | |
Update to 20w18a and add recipe exporter
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'src/main/java/me/shedaniel/rei/plugin')
6 files changed, 14 insertions, 14 deletions
diff --git a/src/main/java/me/shedaniel/rei/plugin/beacon/DefaultBeaconBaseCategory.java b/src/main/java/me/shedaniel/rei/plugin/beacon/DefaultBeaconBaseCategory.java index 099baac8e..8cd93b683 100644 --- a/src/main/java/me/shedaniel/rei/plugin/beacon/DefaultBeaconBaseCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/beacon/DefaultBeaconBaseCategory.java @@ -29,11 +29,12 @@ import me.shedaniel.clothconfig2.api.ScissorsHandler; import me.shedaniel.math.Point; import me.shedaniel.math.Rectangle; import me.shedaniel.rei.api.EntryStack; +import me.shedaniel.rei.api.REIHelper; import me.shedaniel.rei.api.RecipeCategory; import me.shedaniel.rei.api.widgets.Slot; import me.shedaniel.rei.api.widgets.Widgets; import me.shedaniel.rei.gui.entries.RecipeEntry; -import me.shedaniel.rei.gui.widget.ScrollingContainer; +import me.shedaniel.clothconfig2.api.ScrollingContainer; import me.shedaniel.rei.gui.widget.Widget; import me.shedaniel.rei.gui.widget.WidgetWithBounds; import me.shedaniel.rei.plugin.DefaultPlugin; @@ -169,7 +170,7 @@ public class DefaultBeaconBaseCategory implements RecipeCategory<DefaultBeaconBa } ScissorsHandler.INSTANCE.removeLastScissor(); ScissorsHandler.INSTANCE.scissor(scrolling.getBounds()); - scrolling.renderScrollBar(0xff000000, 1); + scrolling.renderScrollBar(0xff000000, 1, REIHelper.getInstance().isDarkThemeEnabled() ? 0.8f : 1f); ScissorsHandler.INSTANCE.removeLastScissor(); } diff --git a/src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingDisplay.java b/src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingDisplay.java index 22c6392a3..5ab1f94cb 100644 --- a/src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingDisplay.java +++ b/src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingDisplay.java @@ -43,14 +43,14 @@ public class DefaultBrewingDisplay implements RecipeDisplay { private List<EntryStack> reactant; public DefaultBrewingDisplay(ItemStack input, Ingredient reactant, ItemStack output) { - this.input = EntryStack.create(input).setting(EntryStack.Settings.TOOLTIP_APPEND_EXTRA, stack -> Collections.singletonList(new TranslatableText("category.rei.brewing.input").method_27692(Formatting.YELLOW))); + this.input = EntryStack.create(input).setting(EntryStack.Settings.TOOLTIP_APPEND_EXTRA, stack -> Collections.singletonList(new TranslatableText("category.rei.brewing.input").formatted(Formatting.YELLOW))); this.reactant = new ArrayList<>(); for (ItemStack stack : reactant.getMatchingStacksClient()) { EntryStack entryStack = EntryStack.create(stack); - entryStack.setting(EntryStack.Settings.TOOLTIP_APPEND_EXTRA, s -> Collections.singletonList(new TranslatableText("category.rei.brewing.reactant").method_27692(Formatting.YELLOW))); + entryStack.setting(EntryStack.Settings.TOOLTIP_APPEND_EXTRA, s -> Collections.singletonList(new TranslatableText("category.rei.brewing.reactant").formatted(Formatting.YELLOW))); this.reactant.add(entryStack); } - this.output = EntryStack.create(output).setting(EntryStack.Settings.TOOLTIP_APPEND_EXTRA, stack -> Collections.singletonList(new TranslatableText("category.rei.brewing.result").method_27692(Formatting.YELLOW))); + this.output = EntryStack.create(output).setting(EntryStack.Settings.TOOLTIP_APPEND_EXTRA, stack -> Collections.singletonList(new TranslatableText("category.rei.brewing.result").formatted(Formatting.YELLOW))); } @Override diff --git a/src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingCategory.java b/src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingCategory.java index 96a735292..afae0a5a0 100644 --- a/src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingCategory.java @@ -74,7 +74,7 @@ public class DefaultCompostingCategory implements RecipeCategory<DefaultComposti @Override public void render(MatrixStack matrices, Rectangle rectangle, int mouseX, int mouseY, float delta) { - MinecraftClient.getInstance().textRenderer.method_27528(matrices, new TranslatableText("text.rei.composting.page", recipe.getPage() + 1), rectangle.x + 5, rectangle.y + 6, -1); + MinecraftClient.getInstance().textRenderer.draw(matrices, new TranslatableText("text.rei.composting.page", recipe.getPage() + 1), rectangle.x + 5, rectangle.y + 6, -1); } }; } diff --git a/src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingDisplay.java b/src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingDisplay.java index fcc9c6d29..575c9701d 100644 --- a/src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingDisplay.java +++ b/src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingDisplay.java @@ -45,7 +45,7 @@ public abstract class DefaultCookingDisplay implements TransferRecipeDisplay { private static List<EntryStack> fuel; static { - fuel = FurnaceBlockEntity.createFuelTimeMap().keySet().stream().map(Item::getStackForRender).map(EntryStack::create).map(e -> e.setting(EntryStack.Settings.TOOLTIP_APPEND_EXTRA, stack -> Collections.singletonList(new TranslatableText("category.rei.smelting.fuel").method_27692(Formatting.YELLOW)))).collect(Collectors.toList()); + fuel = FurnaceBlockEntity.createFuelTimeMap().keySet().stream().map(Item::getStackForRender).map(EntryStack::create).map(e -> e.setting(EntryStack.Settings.TOOLTIP_APPEND_EXTRA, stack -> Collections.singletonList(new TranslatableText("category.rei.smelting.fuel").formatted(Formatting.YELLOW)))).collect(Collectors.toList()); } private AbstractCookingRecipe recipe; diff --git a/src/main/java/me/shedaniel/rei/plugin/fuel/DefaultFuelCategory.java b/src/main/java/me/shedaniel/rei/plugin/fuel/DefaultFuelCategory.java index 5e30ff926..6d9742b61 100644 --- a/src/main/java/me/shedaniel/rei/plugin/fuel/DefaultFuelCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/fuel/DefaultFuelCategory.java @@ -105,7 +105,7 @@ public class DefaultFuelCategory implements RecipeCategory<DefaultFuelDisplay> { slot.setZ(getZ() + 50); slot.getBounds().setLocation(bounds.x + 4, bounds.y + 2); slot.render(matrices, mouseX, mouseY, delta); - MinecraftClient.getInstance().textRenderer.method_27517(matrices, new TranslatableText("category.rei.fuel.time_short.items", burnItems), bounds.x + 25, bounds.y + 8, -1); + MinecraftClient.getInstance().textRenderer.drawWithShadow(matrices, new TranslatableText("category.rei.fuel.time_short.items", burnItems), bounds.x + 25, bounds.y + 8, -1); } }; } diff --git a/src/main/java/me/shedaniel/rei/plugin/information/DefaultInformationCategory.java b/src/main/java/me/shedaniel/rei/plugin/information/DefaultInformationCategory.java index 1b6a529b5..7d22bda0d 100644 --- a/src/main/java/me/shedaniel/rei/plugin/information/DefaultInformationCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/information/DefaultInformationCategory.java @@ -34,7 +34,7 @@ import me.shedaniel.rei.api.REIHelper; import me.shedaniel.rei.api.RecipeCategory; import me.shedaniel.rei.api.widgets.Widgets; import me.shedaniel.rei.gui.entries.RecipeEntry; -import me.shedaniel.rei.gui.widget.ScrollingContainer; +import me.shedaniel.clothconfig2.api.ScrollingContainer; import me.shedaniel.rei.gui.widget.Widget; import me.shedaniel.rei.gui.widget.WidgetWithBounds; import me.shedaniel.rei.impl.RenderingEntry; @@ -46,7 +46,6 @@ import net.minecraft.client.render.BufferRenderer; import net.minecraft.client.render.Tessellator; import net.minecraft.client.render.VertexFormats; import net.minecraft.client.resource.language.I18n; -import net.minecraft.client.util.Texts; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.text.Text; import net.minecraft.util.Identifier; @@ -91,7 +90,7 @@ public class DefaultInformationCategory implements RecipeCategory<DefaultInforma @Override public void render(MatrixStack matrices, Rectangle rectangle, int mouseX, int mouseY, float delta) { - MinecraftClient.getInstance().textRenderer.method_27528(matrices, name, rectangle.x + 5, rectangle.y + 6, -1); + MinecraftClient.getInstance().textRenderer.draw(matrices, name, rectangle.x + 5, rectangle.y + 6, -1); } }; } @@ -158,7 +157,7 @@ public class DefaultInformationCategory implements RecipeCategory<DefaultInforma for (Text text : texts) { if (!this.texts.isEmpty()) this.texts.add(null); - this.texts.addAll(Texts.wrapLines(text, bounds.width - 11, MinecraftClient.getInstance().textRenderer)); + this.texts.addAll(MinecraftClient.getInstance().textRenderer.wrapLines(text, bounds.width - 11)); } } @@ -199,13 +198,13 @@ public class DefaultInformationCategory implements RecipeCategory<DefaultInforma int currentY = (int) -scrolling.scrollAmount + innerBounds.y; for (Text text : texts) { if (text != null && currentY + font.fontHeight >= innerBounds.y && currentY <= innerBounds.getMaxY()) { - font.method_27528(matrices, text, innerBounds.x + 2, currentY + 2, REIHelper.getInstance().isDarkThemeEnabled() ? 0xFFBBBBBB : 0xFF090909); + font.draw(matrices, text, innerBounds.x + 2, currentY + 2, REIHelper.getInstance().isDarkThemeEnabled() ? 0xFFBBBBBB : 0xFF090909); } currentY += text == null ? 4 : font.fontHeight; } ScissorsHandler.INSTANCE.removeLastScissor(); ScissorsHandler.INSTANCE.scissor(scrolling.getBounds()); - scrolling.renderScrollBar(0xff000000, 1); + scrolling.renderScrollBar(0xff000000, 1, REIHelper.getInstance().isDarkThemeEnabled() ? 0.8f : 1f); ScissorsHandler.INSTANCE.removeLastScissor(); } |
