Skip to content

Commit 7e04d7b

Browse files
committed
fix scissoring for 1.20.1 + 1.21.1
1 parent bbc4329 commit 7e04d7b

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

1.20/src/main/java/io/github/axolotlclient/waypoints/map/Minimap.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ public void renderMap(GuiGraphics guiGraphics) {
113113
}
114114
guiGraphics.pose().pushPose();
115115
{
116-
guiGraphics.enableScissor(x, y, x + size, y + size);
116+
var vec1 = guiGraphics.pose().last().pose().transformPosition(x, y, 0, new Vector3f());
117+
var vec2 = guiGraphics.pose().last().pose().transformPosition(x+size, y+size, 0, new Vector3f());
118+
guiGraphics.enableScissor(Mth.floor(vec1.x), Mth.floor(vec1.y), Mth.floor(vec2.x), Mth.floor(vec2.y));
117119
guiGraphics.pose().pushPose();
118120
guiGraphics.pose().translate(x, y, 0);
119121
guiGraphics.pose().translate(radius, radius, 0);

1.21/src/main/java/io/github/axolotlclient/waypoints/map/Minimap.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ public void renderMap(GuiGraphics guiGraphics) {
113113
}
114114
guiGraphics.pose().pushPose();
115115
{
116-
guiGraphics.enableScissor(x, y, x + size, y + size);
116+
var vec1 = guiGraphics.pose().last().pose().transformPosition(x, y, 0, new Vector3f());
117+
var vec2 = guiGraphics.pose().last().pose().transformPosition(x+size, y+size, 0, new Vector3f());
118+
guiGraphics.enableScissor(Mth.floor(vec1.x), Mth.floor(vec1.y), Mth.floor(vec2.x), Mth.floor(vec2.y));
117119
guiGraphics.pose().pushPose();
118120
guiGraphics.pose().translate(x, y, 0);
119121
guiGraphics.pose().translate(radius, radius, 0);

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Changelog
22

3+
### 0.0.1-beta.13
4+
5+
- fix minimap scissoring for 1.20.1 + 1.21.1
6+
37
### 0.0.1-beta.12
48

59
- correct mixin compat level for 1.8.9 + 1.20.1

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ org.gradle.parallel=true
66
axolotlclient.modules.all=true
77

88
# Mod Properties
9-
version=0.0.1-beta.12+3.1.5
9+
version=0.0.1-beta.13+3.1.5
1010

1111
maven_group=io.github.axolotlclient.waypoints
1212

0 commit comments

Comments
 (0)