Skip to content

Commit a8f4798

Browse files
committed
Minecraft 1.21.2/3
Signed-off-by: Hendrix-Shen <[email protected]>
1 parent cb8f764 commit a8f4798

File tree

9 files changed

+69
-10
lines changed

9 files changed

+69
-10
lines changed

build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ preprocess {
2222
Node mc12004_fabric = createNode("1.20.4-fabric", 1_20_04, "mojang")
2323
Node mc12006_fabric = createNode("1.20.6-fabric", 1_20_06, "mojang")
2424
Node mc12101_fabric = createNode("1.21.1-fabric", 1_21_01, "mojang")
25+
Node mc12103_fabric = createNode("1.21.3-fabric", 1_21_03, "mojang")
2526

2627
mc11404_fabric.link(mc11502_fabric, null)
2728
mc11502_fabric.link(mc11605_fabric, file("versions/mapping-fabric-1.15.2-1.16.5.txt"))
@@ -35,6 +36,7 @@ preprocess {
3536
mc12002_fabric.link(mc12004_fabric, null)
3637
mc12004_fabric.link(mc12006_fabric, null)
3738
mc12006_fabric.link(mc12101_fabric, null)
39+
mc12101_fabric.link(mc12103_fabric, null)
3840

3941
// NeoForge
4042
Node mc12101_neoforge = createNode("1.21.1-neoforge", 1_21_01, "mojang")

gradle.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ mod.version=4.0
1818
## Annotation processor
1919
dependencies.lombok_version=1.18.34
2020
## MagicLib
21-
dependencies.magiclib_dependency=0.8.633
22-
dependencies.magiclib_version=0.8.633
21+
dependencies.magiclib_dependency=0.8.635
22+
dependencies.magiclib_version=0.8.635-beta
2323

2424
# Gradle Plugins
2525
architectury_loom_version=1.7-SNAPSHOT

settings.json

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"1.20.4-fabric",
1414
"1.20.6-fabric",
1515
"1.21.1-fabric",
16+
"1.21.3-fabric",
1617

1718
"1.21.1-neoforge"
1819
]

src/main/java/com/plusls/MasaGadget/impl/generic/HitResultHandler.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.jetbrains.annotations.ApiStatus;
2525
import org.jetbrains.annotations.Nullable;
2626
import top.hendrixshen.magiclib.MagicLib;
27+
import top.hendrixshen.magiclib.api.compat.minecraft.util.ProfilerCompat;
2728
import top.hendrixshen.magiclib.api.compat.minecraft.world.entity.EntityCompat;
2829
import top.hendrixshen.magiclib.util.collect.ValueContainer;
2930

@@ -191,7 +192,7 @@ public boolean getLastInventoryPreviewStatus() {
191192
}
192193

193194
public void endClientTickCallback() {
194-
ProfilerFiller profiler = Minecraft.getInstance().getProfiler();
195+
ProfilerFiller profiler = ProfilerCompat.get();
195196
Level level = WorldUtils.getBestWorld(Minecraft.getInstance());
196197

197198
if (level == null) {

src/main/java/com/plusls/MasaGadget/impl/gui/MasaGadgetIcons.java

+14-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
import fi.dy.masa.malilib.render.RenderUtils;
66
import net.minecraft.resources.ResourceLocation;
77

8+
//#if MC > 12101
9+
//$$ import net.minecraft.client.gui.GuiGraphics;
10+
//#endif
11+
812
public enum MasaGadgetIcons implements IGuiIcon {
913
FAVORITE(0, 0, 16, 16, 16, 16);
1014

@@ -47,7 +51,16 @@ public int getV() {
4751
}
4852

4953
@Override
50-
public void renderAt(int x, int y, float zLevel, boolean enabled, boolean selected) {
54+
public void renderAt(
55+
int x,
56+
int y,
57+
float zLevel,
58+
boolean enabled,
59+
boolean selected
60+
//#if MC > 12101
61+
//$$ , GuiGraphics guiGraphics
62+
//#endif
63+
) {
5164
int u = this.u;
5265
int v = this.v;
5366

src/main/java/com/plusls/MasaGadget/impl/mod_tweak/malilib/favoritesSupport/MalilibFavoritesButton.java

+12-3
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,23 @@ public void render(
4040
int mouseY,
4141
boolean selected
4242
//#if MC > 11904
43-
//$$ , GuiGraphics gui
43+
//$$ , GuiGraphics guiGraphicsOrPoseStack
4444
//#elseif MC > 11502
45-
, PoseStack poseStack
45+
, PoseStack guiGraphicsOrPoseStack
4646
//#endif
4747
) {
4848
RenderUtils.color(1.0F, 1.0F, 1.0F, 1.0F);
4949
this.bindTexture(icon.getTexture());
50-
icon.renderAt(this.x, this.y, (float) this.zLevel, this.status, this.isMouseOver(mouseX, mouseY));
50+
icon.renderAt(
51+
this.x,
52+
this.y,
53+
(float) this.zLevel,
54+
this.status,
55+
this.isMouseOver(mouseX, mouseY)
56+
//#if MC > 12101
57+
//$$ , guiGraphicsOrPoseStack
58+
//#endif
59+
);
5160

5261
if (this.isMouseOver(mouseX, mouseY)) {
5362
RenderUtils.drawOutlinedBox(this.x, this.y, this.width, this.height, 0x20C0C0C0, -520093697);

src/main/java/com/plusls/MasaGadget/impl/mod_tweak/tweakeroo/inventoryPreviewSupportSelect/InventoryOverlayRenderHandler.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
import org.jetbrains.annotations.Nullable;
1515
import top.hendrixshen.magiclib.api.render.context.RenderContext;
1616

17+
//#if MC > 12101
18+
//$$ import net.minecraft.client.renderer.RenderType;
19+
//#endif
20+
1721
//#if MC < 12000
1822
import com.plusls.MasaGadget.mixin.accessor.AccessorGuiComponent;
1923
import net.minecraft.network.chat.Component;
@@ -28,6 +32,7 @@
2832
//#endif
2933

3034
//#if MC > 11404
35+
import com.mojang.blaze3d.vertex.PoseStack;
3136
import net.minecraft.client.renderer.MultiBufferSource;
3237
import top.hendrixshen.magiclib.util.minecraft.render.RenderUtil;
3338
//#endif
@@ -243,7 +248,9 @@ private void moveSelectedSlot(int n) {
243248
}
244249

245250
private void renderSlotHighlight(@NotNull RenderContext renderContext, int x, int y) {
246-
//#if MC > 11605
251+
//#if MC > 12101
252+
//$$ renderContext.getGuiComponent().fillGradient(RenderType.guiOverlay(), x, y, x + 16, y + 16, 0x80FFFFFF, 0x80FFFFFF, 0);
253+
//#elseif MC > 11605
247254
//$$ AbstractContainerScreen.renderSlotHighlight(
248255
//#if MC > 11904
249256
//$$ renderContext.getGuiComponent(),

src/main/java/com/plusls/MasaGadget/mixin/mod_tweak/litematica/fixCarpetAccurateProtocol/MixinWorldUtils.java

+16-2
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,14 @@ private static void fixDoEasyPlaceAction0(Minecraft mc, CallbackInfoReturnable<I
165165
}
166166
}
167167

168-
mc.player.connection.send(new ServerboundMovePlayerPacket.Rot(playerCompat.getYRot(), playerCompat.getXRot(), playerCompat.isOnGround()));
168+
mc.player.connection.send(new ServerboundMovePlayerPacket.Rot(
169+
playerCompat.getYRot(),
170+
playerCompat.getXRot(),
171+
playerCompat.isOnGround()
172+
//#if MC > 12101
173+
//$$ , false
174+
//#endif
175+
));
169176
}
170177

171178
if (stateSchematic.getBlock() instanceof FenceGateBlock && stateSchematic.getValue(BlockStateProperties.OPEN)) {
@@ -264,7 +271,14 @@ private static void fixDoEasyPlaceAction1(Minecraft mc, CallbackInfoReturnable<I
264271
if (MixinWorldUtils.masa_gadget_mod$easyPlaceActionOldYaw.get() != null) {
265272
PlayerCompat playerCompat = PlayerCompat.of(Objects.requireNonNull(mc.player));
266273
playerCompat.setYRot(masa_gadget_mod$easyPlaceActionOldYaw.get());
267-
mc.player.connection.send(new ServerboundMovePlayerPacket.Rot(playerCompat.getYRot(), playerCompat.getXRot(), playerCompat.isOnGround()));
274+
mc.player.connection.send(new ServerboundMovePlayerPacket.Rot(
275+
playerCompat.getYRot(),
276+
playerCompat.getXRot(),
277+
playerCompat.isOnGround()
278+
//#if MC > 12101
279+
//$$ , false
280+
//#endif
281+
));
268282
}
269283
}
270284
}
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Dependency Versions
2+
dependencies.minecraft_dependency=>=1.21.2- <1.21.4-
3+
dependencies.minecraft_version=1.21.3
4+
5+
# Compatible Libraries
6+
dependencies.api.itemscroller_version=1.21.3-0.25.0-sakura.2
7+
dependencies.api.litematica_version=1.21.3-0.20.0-sakura.2
8+
dependencies.api.minihud_version=1.21.3-0.33.0-sakura.2
9+
dependencies.api.tweakeroo_version=b105ff1
10+
11+
# Publish properties
12+
publish.game_version=1.21.2\n1.21.3

0 commit comments

Comments
 (0)