diff --git a/gradle.properties b/gradle.properties index 1d67e849..ce22ceaa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,10 +3,10 @@ org.gradle.daemon=false # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=1.20.1 - yarn_mappings=1.20.1+build.9 - loader_version=0.14.21 - fabric_version=0.85.0+1.20.1 + minecraft_version=1.19.4 + yarn_mappings=1.19.4+build.1 + loader_version=0.14.17 + fabric_version=0.76.0+1.19.4 # Mod Properties group=com.minelittlepony @@ -15,12 +15,12 @@ org.gradle.daemon=false description=Mine Little Pony turns players and mobs into ponies. Press F9 ingame to access settings. # Publishing - minecraft_version_range=>=1.20.0 + minecraft_version_range=1.19.4 modrinth_loader_type=fabric modrinth_project_id=JBjInUXM # Dependencies - modmenu_version=7.1.0 - kirin_version=1.15.2 - hd_skins_version=6.10.0+1.20 + modmenu_version=6.1.0-rc.4 + kirin_version=1.15.2+1.19.4 + hd_skins_version=6.10.1+1.19.4 mson_version=1.8.1 diff --git a/src/main/java/com/minelittlepony/client/GuiPonySettings.java b/src/main/java/com/minelittlepony/client/GuiPonySettings.java index 37cc980c..8b789489 100644 --- a/src/main/java/com/minelittlepony/client/GuiPonySettings.java +++ b/src/main/java/com/minelittlepony/client/GuiPonySettings.java @@ -1,8 +1,8 @@ package com.minelittlepony.client; import net.minecraft.client.MinecraftClient; -import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.screen.Screen; +import net.minecraft.client.util.math.MatrixStack; import net.minecraft.text.*; import com.minelittlepony.client.render.MobRenderers; @@ -189,10 +189,10 @@ public class GuiPonySettings extends GameGui { } @Override - public void render(DrawContext context, int mouseX, int mouseY, float partialTicks) { - renderBackground(context); - super.render(context, mouseX, mouseY, partialTicks); - content.render(context, mouseX, mouseY, partialTicks); + public void render(MatrixStack matrices, int mouseX, int mouseY, float partialTicks) { + renderBackground(matrices); + super.render(matrices, mouseX, mouseY, partialTicks); + content.render(matrices, mouseX, mouseY, partialTicks); } @Override diff --git a/src/main/java/com/minelittlepony/client/hdskins/LegendOverlayWidget.java b/src/main/java/com/minelittlepony/client/hdskins/LegendOverlayWidget.java index ed6f8a6a..c99606f3 100644 --- a/src/main/java/com/minelittlepony/client/hdskins/LegendOverlayWidget.java +++ b/src/main/java/com/minelittlepony/client/hdskins/LegendOverlayWidget.java @@ -1,7 +1,8 @@ package com.minelittlepony.client.hdskins; import net.minecraft.client.MinecraftClient; -import net.minecraft.client.gui.DrawContext; +import net.minecraft.client.gui.DrawableHelper; +import net.minecraft.client.util.math.MatrixStack; import net.minecraft.text.Text; import com.minelittlepony.api.pony.*; @@ -23,30 +24,30 @@ class LegendOverlayWidget implements Carousel.Element, ITextContext { } @Override - public void render(DummyPlayer player, DrawContext context, int mouseX, int mouseY) { + public void render(DummyPlayer player, MatrixStack matrices, int mouseX, int mouseY) { IPonyData data = IPony.getManager().getPony(player).metadata(); int[] index = new int[1]; data.getTriggerPixels().forEach((key, value) -> { - context.getMatrices().push(); + matrices.push(); int i = index[0]++; int x = frame.left; int y = frame.top + (i * 10 + 20); - context.getMatrices().translate(x, y, 1); - drawLegendBlock(context, 0, 0, 0, mouseX - x, mouseY - y, key, value); - context.getMatrices().pop(); + matrices.translate(x, y, 1); + drawLegendBlock(matrices, 0, 0, 0, mouseX - x, mouseY - y, key, value); + matrices.pop(); }); } - private void drawLegendBlock(DrawContext context, int index, int x, int y, int mouseX, int mouseY, String key, TriggerPixelType value) { - context.fill(0, 0, LEGEND_BLOCK_BOUNDS.width, LEGEND_BLOCK_BOUNDS.height, 0xFF003333); - context.fill(1, 1, LEGEND_BLOCK_BOUNDS.width - 1, LEGEND_BLOCK_BOUNDS.height - 1, value.getColorCode() | 0xFF000000); + private void drawLegendBlock(MatrixStack matrices, int index, int x, int y, int mouseX, int mouseY, String key, TriggerPixelType value) { + DrawableHelper.fill(matrices, 0, 0, LEGEND_BLOCK_BOUNDS.width, LEGEND_BLOCK_BOUNDS.height, 0xFF003333); + DrawableHelper.fill(matrices, 1, 1, LEGEND_BLOCK_BOUNDS.width - 1, LEGEND_BLOCK_BOUNDS.height - 1, value.getColorCode() | 0xFF000000); char symbol = value.name().charAt(0); if (symbol == '[') { symbol = key.charAt(0); } - context.drawTextWithShadow(getFont(), Text.literal(String.valueOf(symbol).toUpperCase()), 2, 1, 0xFFFFFFFF); + DrawableHelper.drawTextWithShadow(matrices, getFont(), Text.literal(String.valueOf(symbol).toUpperCase()), 2, 1, 0xFFFFFFFF); if (LEGEND_BLOCK_BOUNDS.contains(mouseX, mouseY)) { List lines = value.getOptions().stream().map(option -> { @@ -64,7 +65,8 @@ class LegendOverlayWidget implements Carousel.Element, ITextContext { return color == 0 ? s : s.withColor(value.getColorCode()); })); } - context.drawTooltip(getFont(), lines, 2, 10); + + MinecraftClient.getInstance().currentScreen.renderTooltip(matrices, lines, 2, 10); } } }