Skip to content

Commit 157de18

Browse files
committed
26.2-snapshot-4
1 parent 7321e21 commit 157de18

6 files changed

Lines changed: 145 additions & 4 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* This file is part of the Carpet TIS Addition project, licensed under the
3+
* GNU Lesser General Public License v3.0
4+
*
5+
* Copyright (C) 2026 Fallen_Breath and contributors
6+
*
7+
* Carpet TIS Addition is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU Lesser General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* Carpet TIS Addition is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU Lesser General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public License
18+
* along with Carpet TIS Addition. If not, see <https://www.gnu.org/licenses/>.
19+
*/
20+
21+
package carpettisaddition.helpers.carpet.shape;
22+
23+
// used in mc 26.2+
24+
public interface IShapesRendererRenderedTextGlyphVisitor
25+
{
26+
void setIsMicroTimingMarkerText$TISCM();
27+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* This file is part of the Carpet TIS Addition project, licensed under the
3+
* GNU Lesser General Public License v3.0
4+
*
5+
* Copyright (C) 2026 Fallen_Breath and contributors
6+
*
7+
* Carpet TIS Addition is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU Lesser General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* Carpet TIS Addition is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU Lesser General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public License
18+
* along with Carpet TIS Addition. If not, see <https://www.gnu.org/licenses/>.
19+
*/
20+
21+
package carpettisaddition.mixins.carpet.shape.texthack;
22+
23+
import carpettisaddition.utils.ModIds;
24+
import carpettisaddition.utils.compat.DummyClass;
25+
import me.fallenbreath.conditionalmixin.api.annotation.Condition;
26+
import me.fallenbreath.conditionalmixin.api.annotation.Restriction;
27+
import org.spongepowered.asm.mixin.Mixin;
28+
29+
@Restriction(require = @Condition(value = ModIds.minecraft, versionPredicates = ">=26.2"))
30+
@Mixin(DummyClass.class)
31+
public abstract class ShapesRendererRenderedTextGlyphVisitorMixin
32+
{
33+
}

src/main/java/carpettisaddition/mixins/carpet/shape/texthack/ShapesRendererRenderedTextMixin.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
import org.spongepowered.asm.mixin.injection.Slice;
3737
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
3838

39+
//#if MC >= 26.2
40+
//$$ import carpettisaddition.helpers.carpet.shape.IShapesRendererRenderedTextGlyphVisitor;
41+
//$$ import net.minecraft.client.gui.Font;
42+
//#endif
43+
3944
//#if MC >= 12105
4045
//$$ import com.mojang.blaze3d.opengl.GlStateManager;
4146
//#endif
@@ -98,6 +103,23 @@ private void doSomeTransparentThing(CallbackInfo ci)
98103
}
99104
}
100105

106+
//#if MC >= 26.2
107+
//$$ @ModifyArg(
108+
//$$ method = "renderLines",
109+
//$$ at = @At(
110+
//$$ value = "INVOKE",
111+
//$$ target = "Lnet/minecraft/client/gui/Font$PreparedText;visit(Lnet/minecraft/client/gui/Font$GlyphVisitor;)V"
112+
//$$ )
113+
//$$ )
114+
//$$ private Font.GlyphVisitor seeThroughWhenNecessary_markGlyphVisitor(Font.GlyphVisitor visitor)
115+
//$$ {
116+
//$$ if (this.isMicroTimingMarkerText())
117+
//$$ {
118+
//$$ ((IShapesRendererRenderedTextGlyphVisitor)visitor).setIsMicroTimingMarkerText$TISCM();
119+
//$$ }
120+
//$$ return visitor;
121+
//$$ }
122+
//#else
101123
@ModifyArg(
102124
method = "renderLines",
103125
at = @At(
@@ -142,6 +164,7 @@ private void doSomeTransparentThing(CallbackInfo ci)
142164
//#endif
143165
value;
144166
}
167+
//#endif // end //#if MC >= 26.2 -- else
145168

146169

147170
@Inject(

src/main/resources/carpet-tis-addition.mixins.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"carpet.shape.ShapeDispatcherLineAccessor",
2020
"carpet.shape.ShapeDispatcherSphereAccessor",
2121
"carpet.shape.texthack.ShapeDispatcherTextMixin",
22+
"carpet.shape.texthack.ShapesRendererRenderedTextGlyphVisitorMixin",
2223
"carpet.tweaks.bugfixes.fakePlayerConnectionMemoryLeak.ConnectionMixin",
2324
"carpet.tweaks.bugfixes.fakePlayerNoKnockBack.PlayerEntityMixin",
2425
"carpet.tweaks.bugfixes.scarpetShapeReplacementParticle.ShapeDispatcherExpiringShapeMixin",

versions/26.2/gradle.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Fabric Properties
2-
# check these on https://fallen-breath.github.io/fabric-versions/?version=26.2-snapshot-3
3-
minecraft_version=26.2-snapshot-3
2+
# check these on https://fallen-breath.github.io/fabric-versions/?version=26.2-snapshot-4
3+
minecraft_version=26.2-snapshot-4
44
parchment_version=
55

66
# Fabric Mod Metadata
@@ -10,12 +10,12 @@
1010

1111
# Build Information
1212
# The target mc versions for the mod during mod publishing, separated with \n
13-
game_versions=26.2-snapshot-3
13+
game_versions=26.2-snapshot-4
1414

1515
# Mod Dependency
1616
# check available versions on maven for the given minecraft version you are using
1717
# https://masa.dy.fi/maven/carpet/fabric-carpet/
18-
carpet_core_version=26.2-beta-2+v260416
18+
carpet_core_version=26.2-beta-3+v260422
1919

2020
# Lithium mc26.1.2-0.24.1 for Fabric
2121
# https://www.curseforge.com/minecraft/mc-mods/lithium/files/7905819
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* This file is part of the Carpet TIS Addition project, licensed under the
3+
* GNU Lesser General Public License v3.0
4+
*
5+
* Copyright (C) 2026 Fallen_Breath and contributors
6+
*
7+
* Carpet TIS Addition is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU Lesser General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* Carpet TIS Addition is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU Lesser General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public License
18+
* along with Carpet TIS Addition. If not, see <https://www.gnu.org/licenses/>.
19+
*/
20+
21+
package carpettisaddition.mixins.carpet.shape.texthack;
22+
23+
import carpettisaddition.helpers.carpet.shape.IShapesRendererRenderedTextGlyphVisitor;
24+
import carpettisaddition.utils.ModIds;
25+
import me.fallenbreath.conditionalmixin.api.annotation.Condition;
26+
import me.fallenbreath.conditionalmixin.api.annotation.Restriction;
27+
import net.minecraft.client.gui.Font;
28+
import org.spongepowered.asm.mixin.Mixin;
29+
import org.spongepowered.asm.mixin.Unique;
30+
import org.spongepowered.asm.mixin.injection.At;
31+
import org.spongepowered.asm.mixin.injection.ModifyArg;
32+
33+
@Restriction(require = @Condition(value = ModIds.minecraft, versionPredicates = ">=26.2"))
34+
@Mixin(targets = "carpet.script.utils.ShapesRenderer$RenderedText$1")
35+
public abstract class ShapesRendererRenderedTextGlyphVisitorMixin implements IShapesRendererRenderedTextGlyphVisitor
36+
{
37+
@Unique
38+
private boolean isMicroTimingMarkerText$TISCM = false;
39+
40+
@Override
41+
public void setIsMicroTimingMarkerText$TISCM()
42+
{
43+
this.isMicroTimingMarkerText$TISCM = true;
44+
}
45+
46+
@ModifyArg(
47+
method = "acceptRenderable",
48+
at = @At(
49+
value = "INVOKE",
50+
target = "Lnet/minecraft/client/gui/font/TextRenderable;renderType(Lnet/minecraft/client/gui/Font$DisplayMode;)Lnet/minecraft/client/renderer/rendertype/RenderType;"
51+
)
52+
)
53+
private Font.DisplayMode seeThroughWhenNecessary(Font.DisplayMode value)
54+
{
55+
return this.isMicroTimingMarkerText$TISCM ? Font.DisplayMode.SEE_THROUGH : value;
56+
}
57+
}

0 commit comments

Comments
 (0)