Skip to content

Commit

Permalink
Update to 1.20.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tr7zw committed Sep 22, 2023
1 parent 08aa465 commit f4d6f4b
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion FG-Fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
"accessWidener" : "exordium.accesswidener",
"depends": {
"fabric": "*",
"minecraft": ">=1.20.1"
"minecraft": ">=1.20.2"
}
}
2 changes: 1 addition & 1 deletion FG-Forge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ description='''
[[dependencies.exordium]]
modId="minecraft"
mandatory=true
versionRange="[1.20.1,)"
versionRange="[1.20.2,)"
ordering="NONE"
side="CLIENT"
3 changes: 2 additions & 1 deletion Shared/src/main/java/dev/tr7zw/exordium/BufferManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@
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)
public class CrosshairMixin implements CrosshairOverlayAccess {

@Shadow
private Minecraft minecraft;
@Shadow
private DebugScreenOverlay debugOverlay;

private boolean wasRenderingF3 = false;
private float lastPitch = 0;
Expand All @@ -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())) {
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public ArrayList<Integer> fastGetPlayerInfoListHashCode(List<PlayerInfo> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions gradle-compose.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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")))
'
Expand Down

0 comments on commit f4d6f4b

Please sign in to comment.