Skip to content

Commit 41f9a49

Browse files
committed
Merge branch '1.21.5' into 1.21.8
2 parents 6223dc2 + 0b31738 commit 41f9a49

9 files changed

Lines changed: 70 additions & 13 deletions

File tree

common/src/main/java/xaeroplus/feature/render/DrawFeatureFactory.java

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111

1212
public interface DrawFeatureFactory {
1313

14+
/**
15+
* Refreshed on MC render thread
16+
* Single color across all highlights
17+
* Color function is called each frame
18+
*/
1419
static DrawFeature chunkHighlights(
1520
String id,
1621
DirectChunkHighlightSupplier chunkHighlightSupplier,
@@ -28,6 +33,11 @@ static DrawFeature chunkHighlights(
2833
);
2934
}
3035

36+
/**
37+
* Refreshed on MC render thread
38+
* Color function per-chunk
39+
* Color function is called only on refresh
40+
*/
3141
static DrawFeature multiColorChunkHighlights(
3242
String id,
3343
DirectChunkHighlightSupplier chunkHighlightSupplier,
@@ -45,6 +55,11 @@ static DrawFeature multiColorChunkHighlights(
4555
);
4656
}
4757

58+
/**
59+
* Refreshed async, not on the MC render thread
60+
* Single color across all highlights
61+
* Color function is called each frame
62+
*/
4863
static DrawFeature asyncChunkHighlights(
4964
String id,
5065
AsyncChunkHighlightSupplier chunkHighlightSupplier,
@@ -60,6 +75,11 @@ static DrawFeature asyncChunkHighlights(
6075
);
6176
}
6277

78+
/**
79+
* Refreshed async, not on the MC render thread
80+
* Color function per-chunk
81+
* Color function is called only on refresh
82+
*/
6383
static DrawFeature multiColorAsyncChunkHighlights(
6484
String id,
6585
AsyncChunkHighlightSupplier chunkHighlightSupplier,
@@ -75,6 +95,11 @@ static DrawFeature multiColorAsyncChunkHighlights(
7595
);
7696
}
7797

98+
/**
99+
* Refreshed on MC render thread
100+
* Single color across all lines
101+
* Color function is called each frame
102+
*/
78103
static DrawFeature lines(
79104
String id,
80105
LineSupplier lineSupplier,
@@ -93,6 +118,11 @@ static DrawFeature lines(
93118
);
94119
}
95120

121+
/**
122+
* Refreshed on MC render thread
123+
* Color function per-line
124+
* Color function is called only on refresh
125+
*/
96126
static DrawFeature multiColorLines(
97127
String id,
98128
MultiColorLineSupplier lineSupplier,
@@ -111,6 +141,9 @@ static DrawFeature multiColorLines(
111141
);
112142
}
113143

144+
/**
145+
* Refreshed every frame on MC render thread
146+
*/
114147
static DrawFeature text(
115148
String id,
116149
TextSupplier textSupplier
@@ -121,7 +154,10 @@ static DrawFeature text(
121154
);
122155
}
123156

124-
static DrawFeature text(
157+
/**
158+
* Refreshed async, not on the MC render thread
159+
*/
160+
static DrawFeature asyncText(
125161
String id,
126162
TextSupplier textSupplier,
127163
int refreshIntervalMs

common/src/main/java/xaeroplus/feature/render/highlight/AsyncChunkHighlightSupplier.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,11 @@
66

77
@FunctionalInterface
88
public interface AsyncChunkHighlightSupplier {
9+
/**
10+
* Window = region xz center +- size. meaning the area is: (size*2)^2
11+
* @return a map of long-packed chunk positions to timestamp
12+
* timestamp is unused in rendering but included to reduce memory copies
13+
* as this is the map type xp stores its own highlight data in
14+
*/
915
Long2LongMap getHighlights(final int windowRegionX, final int windowRegionZ, final int windowRegionSize, final ResourceKey<Level> dimension);
1016
}

common/src/main/java/xaeroplus/feature/render/highlight/DirectChunkHighlightSupplier.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,10 @@
66

77
@FunctionalInterface
88
public interface DirectChunkHighlightSupplier {
9+
/**
10+
* @return a map of long-packed chunk positions to timestamp
11+
* timestamp is unused in rendering but included to reduce memory copies
12+
* as this is the map type xp stores its own highlight data in
13+
*/
914
Long2LongMap getHighlights(final ResourceKey<Level> dimension);
1015
}

common/src/main/java/xaeroplus/feature/render/line/LineSupplier.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@
77

88
@FunctionalInterface
99
public interface LineSupplier {
10+
/**
11+
* Window = region xz center +- size. meaning the area is: (size*2)^2
12+
*/
1013
List<Line> getLines(final int windowRegionX, final int windowRegionZ, final int windowRegionSize, final ResourceKey<Level> dimension);
1114
}

common/src/main/java/xaeroplus/feature/render/line/MultiColorLineSupplier.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@
66

77
@FunctionalInterface
88
public interface MultiColorLineSupplier {
9+
/**
10+
* @return Map of line to int color
11+
*/
912
Object2IntMap<Line> getLines(final int windowRegionX, final int windowRegionZ, final int windowRegionSize, final ResourceKey<Level> dimension);
1013
}

common/src/main/java/xaeroplus/module/impl/RegionGrid.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void onEnable() {
3535
)
3636
);
3737
Globals.drawManager.registry().register(
38-
DrawFeatureFactory.text(
38+
DrawFeatureFactory.asyncText(
3939
"RegionGridText",
4040
this::getText,
4141
250

fabric/build.gradle.kts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ loom {
1414
accessWidenerPath = project(":common").loom.accessWidenerPath
1515
runs {
1616
getByName("client") {
17-
ideConfigGenerated(true)
17+
generateRunConfig = true
18+
preferGradleTask = true
1819
client()
1920
}
2021
}
@@ -28,8 +29,10 @@ configurations.getByName("developmentFabric").extendsFrom(common)
2829
afterEvaluate {
2930
loom.runs.configureEach {
3031
// https://fabricmc.net/wiki/tutorial:mixin_hotswaps
31-
vmArg("-javaagent:${ configurations.compileClasspath.get().find { it.name.contains("sponge-mixin") } }")
32-
// vmArg("-Dmixin.debug.export=true")
32+
jvmArguments.addAll(
33+
"-javaagent:${ configurations.compileClasspath.get().find { it.name.contains("sponge-mixin") } }",
34+
// "-Dmixin.debug.export=true"
35+
)
3336
}
3437
}
3538

forge/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ loom {
2727
}
2828
runs {
2929
getByName("client") {
30-
ideConfigGenerated(true)
30+
generateRunConfig = true
31+
preferGradleTask = true
3132
client()
3233
}
3334
}

gradle.properties

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ org.gradle.parallel=false
33
enabled_platforms=fabric,neoforge
44
loom.ignoreDependencyLoomVersionValidation=true
55

6-
mod_version=2.31.6
6+
mod_version=2.32.0
77

88
minecraft_version=1.21.8
99

1010
parchment_version=2025.07.20
1111

12-
worldmap_version_fabric=1.40.16
12+
worldmap_version_fabric=1.41.0
1313

14-
minimap_version_fabric=25.3.12
14+
minimap_version_fabric=26.1.0
1515

16-
worldmap_version_forge=1.40.16
16+
worldmap_version_forge=1.41.0
1717

18-
minimap_version_forge=25.3.12
18+
minimap_version_forge=26.1.0
1919

20-
worldmap_version_neo=1.40.18
20+
worldmap_version_neo=1.41.0
2121

22-
minimap_version_neo=25.3.12
22+
minimap_version_neo=26.1.0
2323

2424
xaerolib_version=1.1.15

0 commit comments

Comments
 (0)