Skip to content

Commit 7350341

Browse files
committed
Port to 1.21.11
1 parent f6e7580 commit 7350341

36 files changed

+98
-252
lines changed

build.gradle.kts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
2-
id("dev.isxander.modstitch.base") version "0.6.2-unstable"
2+
id("dev.isxander.modstitch.base") version "0.7.1-unstable"
3+
id("fabric-loom") version "1.13-SNAPSHOT" apply false
34
id("me.modmuss50.mod-publish-plugin") version "0.8.4"
45
`maven-publish`
56
id("org.ajoberstar.grgit") version "5.3.2"
@@ -8,11 +9,11 @@ plugins {
89
val debugifyVersion = "1.1"
910

1011
modstitch {
11-
minecraftVersion = "1.21.10"
12+
minecraftVersion = "1.21.11"
1213
modLoaderVersion = "0.18.0"
1314

1415
parchment {
15-
mappingsVersion = "2025.10.12"
16+
mappingsVersion = "2025.12.20"
1617
}
1718

1819
metadata {
@@ -212,14 +213,14 @@ val generatePatchedTable by tasks.registering {
212213

213214
val previous = entries.filterIsInstance<PatchedFileEntry.Previous>()
214215

215-
val timestamp = `java.time`.LocalDateTime.now().format(`java.time.format`.DateTimeFormatter.ISO_DATE_TIME)
216+
//val timestamp = `java.time`.LocalDateTime.now().format(`java.time.format`.DateTimeFormatter.ISO_DATE_TIME)
216217

217218
val markdownTable = """
218219
- <!--
219220
- !!!! DO NOT UPDATE THIS FILE MANUALLY !!!!
220221
- Generated by `./gradlew generatePatchedTable`
221222
- Sourced from `${inputFile.name}`
222-
- Generated $timestamp
223+
- Generated now
223224
- -->
224225
-
225226
- # List of Patched Bugs

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ curseforgeId=596224
99
githubProject=isXander/Debugify
1010

1111
# Libraries
12-
fabricApiVersion=0.138.3+1.21.10
13-
yaclVersion=3.8.0+1.21.9-fabric
14-
modMenuVersion=16.0.0-rc.1
12+
fabricApiVersion=0.139.4+1.21.11
13+
yaclVersion=3.8.1+1.21.11-fabric
14+
modMenuVersion=17.0.0-alpha.1

gradle/wrapper/gradle-wrapper.jar

-14.8 KB
Binary file not shown.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

src/client/java/dev/isxander/debugify/client/gui/NoYACLScreen.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import net.minecraft.client.gui.components.Button;
77
import net.minecraft.client.gui.screens.Screen;
88
import net.minecraft.client.input.MouseButtonEvent;
9+
import net.minecraft.client.multiplayer.chat.ChatListener;
910
import net.minecraft.network.chat.ClickEvent;
1011
import net.minecraft.network.chat.CommonComponents;
1112
import net.minecraft.network.chat.Component;
@@ -62,15 +63,14 @@ public void render(GuiGraphics graphics, int mouseX, int mouseY, float delta) {
6263
}
6364
}
6465

65-
66-
@Override
66+
/*@Override
6767
public boolean mouseClicked(MouseButtonEvent mouseButtonEvent, boolean bl) {
6868
if (super.mouseClicked(mouseButtonEvent, bl)) {
6969
return true;
7070
}
7171
7272
Style style = getStyle((int) mouseButtonEvent.x(), (int) mouseButtonEvent.y());
73-
return handleComponentClicked(style);
73+
return this.handleComponentClicked(style);
7474
}
7575
7676
protected Style getStyle(int mouseX, int mouseY) {
@@ -84,5 +84,5 @@ protected Style getStyle(int mouseX, int mouseY) {
8484
int x = mouseX - (width / 2 - font.width(text) / 2);
8585
8686
return font.getSplitter().componentStyleAtWidth(wrappedText.get(line), x);
87-
}
87+
}*/
8888
}
Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,37 @@
11
package dev.isxander.debugify.client.helpers.mc237493;
22

3+
import com.mojang.serialization.Codec;
34
import java.util.Arrays;
45
import java.util.Comparator;
6+
import java.util.function.IntFunction;
57

68
import net.minecraft.network.chat.Component;
9+
import net.minecraft.util.ByIdMap;
710
import net.minecraft.util.Mth;
8-
import net.minecraft.util.OptionEnum;
11+
import net.minecraft.util.StringRepresentable;
912

10-
public enum DebugifyTelemetry implements OptionEnum {
13+
public enum DebugifyTelemetry {
1114
OFF(0, "options.telemetry.state.none", "debugify.mc_237493.tooltip.off"),
1215
MINIMAL(1, "options.telemetry.state.minimal", "debugify.mc_237493.tooltip.minimal"),
1316
ALL(2, "options.telemetry.state.all", "debugify.mc_237493.tooltip.all");
1417

15-
private static final DebugifyTelemetry[] VALUES = Arrays.stream(values())
16-
.sorted(Comparator.comparingInt(DebugifyTelemetry::getId))
17-
.toArray(DebugifyTelemetry[]::new);
18-
18+
private static final IntFunction<DebugifyTelemetry> BY_ID = ByIdMap.continuous(value -> value.id, values(), ByIdMap.OutOfBoundsStrategy.WRAP);
19+
public static final Codec<DebugifyTelemetry> LEGACY_CODEC = Codec.INT.xmap(BY_ID::apply, value -> value.id);
1920
private final int id;
20-
private final String translationKey;
21-
private final String tooltipTranslationKey;
21+
private final Component caption;
22+
private final Component tooltip;
2223

23-
DebugifyTelemetry(int id, String translationKey, String tooltipTranslationKey) {
24+
DebugifyTelemetry(int id, final String key, final String translationKey) {
2425
this.id = id;
25-
this.translationKey = translationKey;
26-
this.tooltipTranslationKey = tooltipTranslationKey;
27-
}
28-
29-
@Override
30-
public int getId() {
31-
return this.id;
32-
}
33-
34-
@Override
35-
public String getKey() {
36-
return this.translationKey;
37-
}
38-
39-
public String getTooltipKey() {
40-
return this.tooltipTranslationKey;
26+
this.caption = Component.translatable(key);
27+
this.tooltip = Component.translatable(translationKey);
4128
}
4229

43-
public Component getTooltipText() {
44-
return Component.translatable(getTooltipKey(), getCaption());
30+
public Component caption() {
31+
return this.caption;
4532
}
4633

47-
public static DebugifyTelemetry byId(int id) {
48-
return VALUES[Mth.positiveModulo(id, VALUES.length)];
34+
public Component tooltip() {
35+
return this.tooltip;
4936
}
5037
}

src/client/java/dev/isxander/debugify/client/mixins/basic/mc115092/SquidRendererMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import dev.isxander.debugify.fixes.FixCategory;
77
import net.minecraft.client.renderer.entity.SquidRenderer;
88
import net.minecraft.client.renderer.entity.state.SquidRenderState;
9-
import net.minecraft.world.entity.animal.Squid;
9+
import net.minecraft.world.entity.animal.squid.Squid;
1010
import org.spongepowered.asm.mixin.Mixin;
1111
import org.spongepowered.asm.mixin.Unique;
1212
import org.spongepowered.asm.mixin.injection.At;

src/client/java/dev/isxander/debugify/client/mixins/basic/mc122477/EditBoxMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
import dev.isxander.debugify.fixes.FixCategory;
55
import dev.isxander.debugify.client.helpers.mc122477.KeyboardPollCounter;
66
import dev.isxander.debugify.fixes.OS;
7-
import net.minecraft.Util;
87
import net.minecraft.client.gui.Font;
98
import net.minecraft.client.gui.components.EditBox;
109
import net.minecraft.client.input.CharacterEvent;
1110
import net.minecraft.network.chat.Component;
11+
import net.minecraft.util.Util;
1212
import org.spongepowered.asm.mixin.Mixin;
1313
import org.spongepowered.asm.mixin.injection.At;
1414
import org.spongepowered.asm.mixin.injection.Inject;

src/client/java/dev/isxander/debugify/client/mixins/basic/mc197260/ArmorStandRendererMixin.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package dev.isxander.debugify.client.mixins.basic.mc197260;
22

3-
import com.mojang.datafixers.util.Pair;
43
import dev.isxander.debugify.fixes.BugFix;
54
import dev.isxander.debugify.fixes.FixCategory;
65
import net.minecraft.client.Minecraft;
@@ -9,9 +8,7 @@
98
import net.minecraft.client.renderer.entity.state.ArmorStandRenderState;
109
import org.spongepowered.asm.mixin.Mixin;
1110

12-
import java.util.Comparator;
13-
import java.util.stream.IntStream;
14-
import net.minecraft.client.model.ArmorStandArmorModel;
11+
import net.minecraft.client.model.object.armorstand.ArmorStandArmorModel;
1512
import net.minecraft.client.renderer.LightTexture;
1613
import net.minecraft.client.renderer.entity.ArmorStandRenderer;
1714
import net.minecraft.core.BlockPos;
@@ -39,13 +36,14 @@ protected ArmorStandRendererMixin(EntityRendererProvider.Context context) {
3936
BlockPos mainPos = BlockPos.containing(livingEntity.x, livingEntity.y, livingEntity.z);
4037
ClientLevel level = Minecraft.getInstance().level;
4138

42-
livingEntity.lightCoords = IntStream.of(-1, 0, 2, 3)
43-
.mapToObj(operand -> {
44-
BlockPos pos = mainPos.offset(0, operand, 0);
45-
return Pair.of(level.getBrightness(LightLayer.BLOCK, pos), pos);
46-
})
47-
.max(Comparator.comparingInt(Pair::getFirst))
48-
.map(p -> LightTexture.pack(p.getFirst(), level.getBrightness(LightLayer.SKY, p.getSecond())))
49-
.orElse(livingEntity.lightCoords);
39+
int maxSkyLight = 0;
40+
int maxBlockLight = 0;
41+
for (int offset : new int[] { -1, 0, 2, 3 }) {
42+
BlockPos pos = mainPos.offset(0, offset, 0);
43+
maxSkyLight = Math.max(maxSkyLight, level.getBrightness(LightLayer.SKY, pos));
44+
maxBlockLight = Math.max(maxBlockLight, level.getBrightness(LightLayer.BLOCK, pos));
45+
}
46+
47+
livingEntity.lightCoords = LightTexture.pack(maxBlockLight, maxSkyLight);
5048
}
5149
}

src/client/java/dev/isxander/debugify/client/mixins/basic/mc22882/AbstractContainerScreenMixin.java

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)