Skip to content

Commit 306cc26

Browse files
committed
it's beautiful (port 26.1)
1 parent aeecc6d commit 306cc26

File tree

107 files changed

+894
-628
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+894
-628
lines changed

.bugs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
patched 577 client basic
66
patched 4490 client basic
77
patched 12062 client basic
8-
patched 22882 client basic
98
patched 35361 client basic
109
patched 46737 client basic
1110
patched 46766 client basic
@@ -47,7 +46,6 @@ patched 280220 client basic
4746
patched 298225 client basic
4847
patched 298558 client basic
4948

50-
patched 2025 server basic
5149
patched 7569 server basic
5250
patched 8187 server gameplay
5351
patched 30391 server basic
@@ -63,7 +61,6 @@ patched 119754 server basic
6361
patched 121706 server basic
6462
patched 121903 server basic
6563
patched 123450 server basic
66-
patched 123605 server basic
6764
patched 129909 server basic
6865
patched 132878 server basic
6966
patched 134110 server basic
@@ -79,15 +76,13 @@ patched 177381 server basic
7976
patched 179072 server basic
8077
patched 183990 server basic
8178
patched 187100 server basic
82-
patched 199467 server basic
8379
patched 200418 server basic
8480
patched 201374 server basic
8581
patched 202637 server basic
8682
patched 206705 server basic
8783
patched 206922 server basic
8884
patched 214147 server basic
8985
patched 215530 server basic
90-
patched 219981 server basic
9186
patched 221257 server basic
9287
patched 223153 server basic
9388
patched 224729 server basic
@@ -141,6 +136,7 @@ previous 135971 24w33a
141136
previous 12829 24w44a
142137
previous 55347 24w44a
143138
previous 111516 24w44a
139+
previous 263865 25w04a
144140
previous 112730 25w21a
145141
previous 183776 25w31a
146142
previous 46503 25w33a
@@ -152,3 +148,5 @@ previous 267469 1.21.9
152148
previous 201723 1.21.9
153149
previous 22882 25w41a
154150
previous 199467 25w45a
151+
previous 219981 26.1-snapshot-1
152+
previous 123605 26.1-snapshot-6

build.gradle.kts

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@ plugins {
1616
val debugifyVersion = "1.0"
1717

1818
modstitch {
19-
minecraftVersion = "1.21.11"
20-
modLoaderVersion = "0.18.4"
21-
22-
parchment {
23-
mappingsVersion = "2025.12.20"
24-
}
19+
minecraftVersion = property("minecraftVersion")!!.toString()
20+
modLoaderVersion = "0.18.6"
2521

2622
metadata {
2723
modVersion = minecraftVersion.map { "$it+$debugifyVersion" }
@@ -45,8 +41,6 @@ modstitch {
4541

4642
loom {
4743
configureLoom {
48-
mixin.useLegacyMixinAp = false
49-
5044
splitEnvironmentSourceSets()
5145

5246
val gametest by sourceSets.registering {
@@ -56,7 +50,6 @@ modstitch {
5650
runtimeClasspath += sourceSets["client"].runtimeClasspath
5751
}
5852

59-
//createProxyConfigurations(sourceSets["client"])
6053
createProxyConfigurations(gametest.get())
6154

6255
mods.register("debugify") {
@@ -89,13 +82,7 @@ repositories {
8982
forRepository { maven("https://maven.terraformersmc.com/releases") }
9083
filter { includeGroup("com.terraformersmc") }
9184
}
92-
exclusiveContent {
93-
forRepository { maven("https://maven.isxander.dev/releases") }
94-
filter {
95-
includeGroup("dev.isxander")
96-
includeGroup("org.quiltmc.parsers")
97-
}
98-
}
85+
maven("https://maven.isxander.dev/releases")
9986
}
10087

10188
val fabricApiVersion: String by project
@@ -104,15 +91,13 @@ val mixinExtrasVersion: String by project
10491
val modMenuVersion: String by project
10592

10693
dependencies {
107-
modImplementation(fabricApi.module("fabric-resource-loader-v0", fabricApiVersion))
108-
modImplementation("net.fabricmc.fabric-api:fabric-api:$fabricApiVersion")
94+
implementation("net.fabricmc.fabric-api:fabric-api:$fabricApiVersion")
10995

110-
"modClientImplementation"("dev.isxander:yet-another-config-lib:$yaclVersion")
111-
"modClientImplementation"("com.terraformersmc:modmenu:$modMenuVersion")
96+
"clientImplementation"("dev.isxander:yet-another-config-lib:$yaclVersion")
97+
"clientImplementation"("com.terraformersmc:modmenu:$modMenuVersion")
11298

11399
"gametestImplementation"(sourceSets.main.get().output)
114100
"gametestImplementation"(sourceSets["client"].output)
115-
"modGametestImplementation"(fabricApi.module("fabric-gametest-api-v1", fabricApiVersion))
116101

117102
nmcpAggregation(project)
118103
}
@@ -129,7 +114,7 @@ tasks.javadoc {
129114
publishMods {
130115
displayName = modstitch.metadata.modVersion.map { "Debugify $it" }
131116
version = modstitch.metadata.modVersion
132-
file = tasks.remapJar.get().archiveFile
117+
//file = tasks.remapJar.get().archiveFile
133118
type = STABLE
134119
modLoaders.add("fabric")
135120

gradle.properties

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ org.gradle.jvmargs=-Xmx4G
22
org.gradle.parallel=true
33
org.gradle.parallel.threads=4
44

5-
modstitch.platform=fabric-loom-remap
5+
modstitch.platform=fabric-loom
66

77
pub.modrinthId=QwxR6Gcd
88
pub.curseforgeId=596224
99
pub.curseforgeSlug=debugify
1010
githubProject=isXander/Debugify
1111

1212
# Libraries
13-
fabricApiVersion=0.139.4+1.21.11
14-
yaclVersion=3.8.1+1.21.11-fabric
15-
modMenuVersion=17.0.0-alpha.1
13+
minecraftVersion=26.1.2
14+
fabricApiVersion=0.145.4+26.1.2
15+
yaclVersion=3.9.2+26.1-fabric
16+
modMenuVersion=18.0.0-alpha.8

scripts/check_bug_fixes.py

Lines changed: 34 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import re
21
import requests
32
import sys
43
import os
@@ -22,47 +21,49 @@ def version_idx(version):
2221
minecraft_version_idx = version_idx(minecraft_version)
2322
print(f'Minecraft Version: {minecraft_version}')
2423

25-
with open('../PATCHED.md', 'r') as f:
26-
patched_lines = f.readlines()
24+
with open('../.bugs', 'r') as f:
25+
bugs_lines = f.readlines()
2726

2827
bugs = []
29-
start_unpatched = False
30-
pattern = re.compile('\\|.+\\| \\[(MC-\\d+)]')
28+
for line in bugs_lines:
29+
parts = line.split()
30+
if len(parts) >= 3 and parts[0] == 'patched':
31+
bugs.append((f'MC-{parts[1]}', parts[2]))
3132

32-
for line in patched_lines:
33-
if line.startswith('## '):
34-
if start_unpatched:
35-
break
36-
start_unpatched = line == '## Unpatched in vanilla\n'
37-
38-
if not start_unpatched:
33+
resolved_count = 0
34+
duplicate_count = 0
35+
for bug, side in bugs:
36+
try:
37+
response = requests.get(f'https://mojira.dev/api/v1/issues/{bug}')
38+
except Exception as e:
39+
print(f'Failed to fetch {bug}: {e}')
3940
continue
4041

41-
match = re.search(pattern, line)
42-
if match is None:
42+
if not response.ok:
43+
print(f'Failed to fetch {bug}: HTTP {response.status_code} {response.text.strip()}')
4344
continue
44-
bugs.append(match.group(1))
4545

46-
resolved_count = 0
47-
duplicate_count = 0
48-
for bug in bugs:
49-
response = requests.get(f'https://bugs.mojang.com/rest/api/2/issue/{bug}')
50-
json_response = response.json()
46+
try:
47+
json_response = response.json()
48+
except Exception as e:
49+
text = response.text.strip()
50+
if '\n' not in text and len(text) < 100:
51+
print(f'\033[35m{bug} ({side}): {text}\033[0m')
52+
else:
53+
print(f'Failed to parse response for {bug} ({side}): {e}\n{text}')
54+
continue
5155

52-
fields = json_response['fields']
53-
resolution_id = int(fields['resolution']['id']) if fields['resolution'] is not None else -1
56+
resolution = json_response['resolution']
57+
fix_versions = [v.replace(' Pre-release ', '-pre').replace(' Release Candidate ', '-rc').replace(' Snapshot ', '-snapshot-').replace('Minecraft ', '')
58+
for v in (json_response.get('fix_versions') or [])]
5459

5560
message_color = ''
56-
match resolution_id:
57-
case 1 | 5: # resolved
61+
match resolution:
62+
case 'Fixed' | "Won't Fix" | 'Works As Intended':
5863
resolved_count += 1
59-
bug_status = "Resolved"
64+
bug_status = resolution
6065
message_color = '\033[91m'
6166

62-
fix_versions = []
63-
for v in fields['fixVersions'] or []:
64-
fix_versions.append(v['name'].replace(' Pre-release ', '-pre').replace(' Release Candidate ', '-rc'))
65-
6667
if len(fix_versions) > 0:
6768
bug_status += f' in {", ".join(fix_versions)}'
6869

@@ -71,32 +72,17 @@ def version_idx(version):
7172
message_color = '\033[33m'
7273
resolved_count -= 1
7374

74-
case 3: # duplicate
75+
case 'Duplicate':
7576
duplicate_count += 1
7677
bug_status = "Duplicate"
7778
message_color = '\033[33m'
7879

79-
duplicates = None
80-
duplicate_fixed = False
81-
issue_links = fields['issuelinks']
82-
for issue in issue_links:
83-
if int(issue['type']['id']) == 10102:
84-
duplicates = issue['outwardIssue']['key']
85-
duplicate_fixed = int(issue['outwardIssue']['fields']['status']['id']) == 1 | 5
86-
break
87-
88-
if duplicates is not None:
89-
bug_status += f' of {duplicates}'
90-
if duplicate_fixed:
91-
bug_status += f' which is resolved'
92-
message_color = '\033[91m'
93-
resolved_count += 1
94-
9580
case _:
9681
bug_status = 'OK!'
9782

98-
message = f"{message_color}{bug}: {bug_status}\033[0m"
99-
print(message, file=sys.stderr if resolution_id == 1 else sys.stdout)
83+
is_resolved = resolution in ('Fixed', "Won't Fix", 'Works As Intended')
84+
message = f"{message_color}{bug} ({side}): {bug_status}\033[0m"
85+
print(message, file=sys.stderr if is_resolved else sys.stdout)
10086

10187
if resolved_count == 0 and duplicate_count == 0:
10288
print('\nNothing to report!')

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

Lines changed: 13 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -2,98 +2,26 @@
22

33
import net.fabricmc.loader.api.FabricLoader;
44
import net.minecraft.ChatFormatting;
5-
import net.minecraft.client.gui.ActiveTextCollector;
6-
import net.minecraft.client.gui.GuiGraphics;
7-
import net.minecraft.client.gui.components.Button;
5+
import net.minecraft.client.Minecraft;
6+
import net.minecraft.client.gui.screens.AlertScreen;
87
import net.minecraft.client.gui.screens.Screen;
9-
import net.minecraft.client.input.MouseButtonEvent;
108
import net.minecraft.network.chat.ClickEvent;
11-
import net.minecraft.network.chat.CommonComponents;
129
import net.minecraft.network.chat.Component;
13-
import net.minecraft.network.chat.Style;
14-
import net.minecraft.util.FormattedCharSequence;
15-
import net.minecraft.util.Mth;
1610

1711
import java.net.URI;
18-
import java.util.List;
19-
import org.jspecify.annotations.Nullable;
20-
21-
public class NoYACLScreen extends Screen {
22-
private final Screen parent;
23-
24-
private final FormattedCharSequence title;
25-
private List<FormattedCharSequence> wrappedText;
26-
private final Component unwrappedText;
2712

13+
public class NoYACLScreen extends AlertScreen {
2814
public NoYACLScreen(Screen parent) {
29-
super(Component.translatable("debugify.no_yacl.title"));
30-
this.parent = parent;
31-
this.title = Component.translatable("debugify.no_yacl.title").withStyle(ChatFormatting.BOLD).getVisualOrderText();
32-
this.unwrappedText = Component.translatable("debugify.no_yacl.description",
33-
Component.literal("YetAnotherConfigLib").withStyle(style -> style
34-
.withClickEvent(new ClickEvent.OpenUrl(URI.create("https://curseforge.com/minecraft/mc-mods/yacl")))
35-
.applyFormats(ChatFormatting.BLUE, ChatFormatting.UNDERLINE)),
36-
Component.literal(".minecraft/config/debugify.json").withStyle(style -> style
37-
.withClickEvent(new ClickEvent.OpenFile(FabricLoader.getInstance().getConfigDir()))
38-
.applyFormats(ChatFormatting.BLUE, ChatFormatting.UNDERLINE)));
39-
}
40-
41-
@Override
42-
protected void init() {
43-
this.wrappedText = this.font.split(unwrappedText, width - 50);
44-
this.addRenderableWidget(
45-
Button.builder(CommonComponents.GUI_BACK, button -> minecraft.setScreen(parent))
46-
.pos(
47-
(this.width - 150) / 2,
48-
Mth.clamp(90 + this.wrappedText.size() * 9 + 12, this.height / 6 + 96, this.height - 24)
49-
)
50-
.size(150, 20)
51-
.build()
15+
super(
16+
() -> Minecraft.getInstance().setScreen(parent),
17+
Component.translatable("debugify.no_yacl.title").withStyle(ChatFormatting.BOLD),
18+
Component.translatable("debugify.no_yacl.description",
19+
Component.literal("YetAnotherConfigLib").withStyle(style -> style
20+
.withClickEvent(new ClickEvent.OpenUrl(URI.create("https://curseforge.com/minecraft/mc-mods/yacl")))
21+
.applyFormats(ChatFormatting.BLUE, ChatFormatting.UNDERLINE)),
22+
Component.literal(".minecraft/config/debugify.json").withStyle(style -> style
23+
.withClickEvent(new ClickEvent.OpenFile(FabricLoader.getInstance().getConfigDir()))
24+
.applyFormats(ChatFormatting.BLUE, ChatFormatting.UNDERLINE)))
5225
);
5326
}
54-
55-
@Override
56-
public void render(GuiGraphics graphics, int mouseX, int mouseY, float delta) {
57-
super.render(graphics, mouseX, mouseY, delta);
58-
59-
graphics.drawCenteredString(this.font, title, this.width / 2, 70, -1);
60-
int y = 90;
61-
for (FormattedCharSequence line : wrappedText) {
62-
graphics.drawCenteredString(this.font, line, this.width / 2, y, -1);
63-
y += this.font.lineHeight;
64-
}
65-
}
66-
67-
@Override
68-
public boolean mouseClicked(MouseButtonEvent mouseButtonEvent, boolean bl) {
69-
if (super.mouseClicked(mouseButtonEvent, bl)) {
70-
return true;
71-
}
72-
73-
Style style = this.getStyle((int) mouseButtonEvent.x(), (int) mouseButtonEvent.y());
74-
return this.handleClickEvent(style.getClickEvent());
75-
}
76-
77-
protected Style getStyle(int mouseX, int mouseY) {
78-
int y = mouseY - 90;
79-
int line = y / this.font.lineHeight;
80-
81-
if (y < 0 || y > y + this.wrappedText.size() * this.font.lineHeight) return null;
82-
if (line < 0 || line >= this.wrappedText.size()) return null;
83-
84-
FormattedCharSequence text = this.wrappedText.get(line);
85-
int x = mouseX - (this.width / 2 - this.font.width(text) / 2);
86-
87-
ActiveTextCollector.ClickableStyleFinder clickableStyleFinder = new ActiveTextCollector.ClickableStyleFinder(this.font, mouseX, mouseY);
88-
return clickableStyleFinder.result();
89-
}
90-
91-
protected boolean handleClickEvent(@Nullable ClickEvent clickEvent) {
92-
if (clickEvent == null) {
93-
return false;
94-
}
95-
96-
defaultHandleGameClickEvent(clickEvent, this.minecraft, this);
97-
return true;
98-
}
9927
}

0 commit comments

Comments
 (0)