diff --git a/FG-Fabric/src/main/resources/fabric.mod.json b/FG-Fabric/src/main/resources/fabric.mod.json index fb43825..70a798c 100644 --- a/FG-Fabric/src/main/resources/fabric.mod.json +++ b/FG-Fabric/src/main/resources/fabric.mod.json @@ -35,6 +35,6 @@ "accessWidener" : "exordium.accesswidener", "depends": { "fabric": "*", - "minecraft": ">=1.20.1" + "minecraft": ">=1.20.2" } } diff --git a/FG-Forge/src/main/resources/META-INF/mods.toml b/FG-Forge/src/main/resources/META-INF/mods.toml index e304f88..d95d5fb 100644 --- a/FG-Forge/src/main/resources/META-INF/mods.toml +++ b/FG-Forge/src/main/resources/META-INF/mods.toml @@ -19,6 +19,6 @@ description=''' [[dependencies.exordium]] modId="minecraft" mandatory=true - versionRange="[1.20.1,)" + versionRange="[1.20.2,)" ordering="NONE" side="CLIENT" diff --git a/Shared/src/main/java/dev/tr7zw/exordium/BufferManager.java b/Shared/src/main/java/dev/tr7zw/exordium/BufferManager.java index c169ec6..8d91947 100644 --- a/Shared/src/main/java/dev/tr7zw/exordium/BufferManager.java +++ b/Shared/src/main/java/dev/tr7zw/exordium/BufferManager.java @@ -20,6 +20,7 @@ import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.scores.DisplaySlot; import net.minecraft.world.scores.Scoreboard; public class BufferManager { @@ -68,7 +69,7 @@ public void initialize() { GuiAccess guiAccess = (GuiAccess) minecraft.gui; TablistAccess tablistAccess = (TablistAccess) guiAccess.getPlayerTabOverlay(); Scoreboard scoreboard = minecraft.level.getScoreboard(); - tablistAccess.updateState(scoreboard, scoreboard.getDisplayObjective(0)); + tablistAccess.updateState(scoreboard, scoreboard.getDisplayObjective(DisplaySlot.LIST)); BufferedComponent bufferedComponent = tablistAccess.getPlayerListOverlayBuffer(); if (bufferedComponent.render()) { data.cancel().set(true); diff --git a/Shared/src/main/java/dev/tr7zw/exordium/mixin/CrosshairMixin.java b/Shared/src/main/java/dev/tr7zw/exordium/mixin/CrosshairMixin.java index 60dc994..ee744d3 100644 --- a/Shared/src/main/java/dev/tr7zw/exordium/mixin/CrosshairMixin.java +++ b/Shared/src/main/java/dev/tr7zw/exordium/mixin/CrosshairMixin.java @@ -15,6 +15,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.DebugScreenOverlay; import net.minecraft.world.entity.LivingEntity; @Mixin(Gui.class) @@ -22,6 +23,8 @@ public class CrosshairMixin implements CrosshairOverlayAccess { @Shadow private Minecraft minecraft; + @Shadow + private DebugScreenOverlay debugOverlay; private boolean wasRenderingF3 = false; private float lastPitch = 0; @@ -35,7 +38,7 @@ public class CrosshairMixin implements CrosshairOverlayAccess { @Override public boolean needsRender() { - if (wasRenderingF3 != minecraft.options.renderDebug) { + if (wasRenderingF3 != debugOverlay.showDebugScreen()) { return true; } if(lastHidden != ((minecraft.options.getCameraType() != CameraType.FIRST_PERSON) || minecraft.player.isSpectator())) { @@ -64,7 +67,7 @@ public boolean needsRender() { @Override public void captureState() { lastHidden = minecraft.options.getCameraType() != CameraType.FIRST_PERSON || minecraft.player.isSpectator(); - wasRenderingF3 = minecraft.options.renderDebug; + wasRenderingF3 = debugOverlay.showDebugScreen(); lastPitch = minecraft.getCameraEntity().getXRot(); lastYaw = minecraft.getCameraEntity().getYRot(); lastCooldown = minecraft.player.getAttackStrengthScale(0.0F); diff --git a/Shared/src/main/java/dev/tr7zw/exordium/mixin/PlayerTabOverlayMixin.java b/Shared/src/main/java/dev/tr7zw/exordium/mixin/PlayerTabOverlayMixin.java index 8e25396..f6af618 100644 --- a/Shared/src/main/java/dev/tr7zw/exordium/mixin/PlayerTabOverlayMixin.java +++ b/Shared/src/main/java/dev/tr7zw/exordium/mixin/PlayerTabOverlayMixin.java @@ -101,7 +101,7 @@ public ArrayList fastGetPlayerInfoListHashCode(List playerI playerHash += Objects.hash(playerTeam.getColor(), prefix.getStyle(), prefix.getString(), suffix.getStyle(), suffix.getString()); } playerHash += playerInfo.getGameMode() == GameType.SPECTATOR ? 31 : 0; - playerHash += playerInfo.getSkinLocation().hashCode(); + playerHash += playerInfo.getSkin().texture().hashCode(); playerHash += playerInfo.getLatency() * 63; if (lastTrackedObjective != null diff --git a/Shared/src/main/java/dev/tr7zw/exordium/util/ScoreboardHelper.java b/Shared/src/main/java/dev/tr7zw/exordium/util/ScoreboardHelper.java index ba14c5f..16d9b76 100644 --- a/Shared/src/main/java/dev/tr7zw/exordium/util/ScoreboardHelper.java +++ b/Shared/src/main/java/dev/tr7zw/exordium/util/ScoreboardHelper.java @@ -10,6 +10,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.network.chat.Component; +import net.minecraft.world.scores.DisplaySlot; import net.minecraft.world.scores.Objective; import net.minecraft.world.scores.PlayerTeam; import net.minecraft.world.scores.Score; @@ -26,10 +27,10 @@ public static ScoreboardState getScoreboardData() { if (playerTeam != null) { int n = playerTeam.getColor().getId(); if (n >= 0) - objective = scoreboard.getDisplayObjective(3 + n); + objective = scoreboard.getDisplayObjective(DisplaySlot.BY_ID.apply(3 + n)); } if (objective == null) { - objective = scoreboard.getDisplayObjective(1); + objective = scoreboard.getDisplayObjective(DisplaySlot.SIDEBAR); } if (objective == null) { return null; diff --git a/gradle-compose.yml b/gradle-compose.yml index f6acf89..6c2bd96 100644 --- a/gradle-compose.yml +++ b/gradle-compose.yml @@ -1,5 +1,5 @@ version: '0.0.2' -source: "https://github.com/tr7zw/ModComposeTemplate/tree/1.20" +source: "https://github.com/tr7zw/ModComposeTemplate/tree/1.20.2" replacements: group: "dev.tr7zw" name: "Exordium" @@ -24,11 +24,11 @@ subProjects: template: "Fabric" replacements: dependencies: ' - modImplementation "maven.modrinth:immediatelyfast:1.2.1+1.20.1" + modImplementation "maven.modrinth:immediatelyfast:1.2.5+1.20.2" - modImplementation "maven.modrinth:spark:BeIg1bik" + modImplementation "maven.modrinth:spark:XGW2fviP" - modImplementation "maven.modrinth:sodium:6SSPmLc9" + modImplementation "maven.modrinth:sodium:mc1.20.2-0.5.3" include(implementation(annotationProcessor("io.github.llamalad7:mixinextras-fabric:0.2.0-rc.2"))) '