Skip to content

Commit 2b8b696

Browse files
rosellleshedaniel
andauthored
Port to 1.21.6 (#633)
* Port to 1.21.6-rc1 * Bump for 1.21.6 --------- Co-authored-by: shedaniel <daniel@shedaniel.me>
1 parent 9038d94 commit 2b8b696

File tree

15 files changed

+41
-40
lines changed

15 files changed

+41
-40
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build PR snapshot (1.21.5)
1+
name: Build PR snapshot (1.21.6)
22

33
on:
44
pull_request:
@@ -7,7 +7,7 @@ on:
77
- '**.properties'
88
- '**/src/**'
99
branches:
10-
- "1.21.5"
10+
- "1.21.6"
1111
types: [ opened, synchronize, reopened ]
1212
jobs:
1313
validate-gradle:
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Release (1.21.5)
1+
name: Build and Release (1.21.6)
22

33
on:
44
push:
@@ -8,7 +8,7 @@ on:
88
- '**/src/**'
99
- '.github/**'
1010
branches:
11-
- "1.21.5"
11+
- "1.21.6"
1212
workflow_dispatch:
1313
inputs:
1414
norelease:

common/src/main/java/dev/architectury/platform/Platform.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private static void updateLoaderCache() {
7373
}
7474

7575
public static String getMinecraftVersion() {
76-
return SharedConstants.getCurrentVersion().getId();
76+
return SharedConstants.getCurrentVersion().id();
7777
}
7878

7979
/**

fabric/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ unifiedPublishing {
128128
curseforge {
129129
token = CURSE_API_KEY
130130
id = rootProject.curseforge_id
131-
gameVersions.addAll "Java 21", "1.21.5-Snapshot", project.minecraft_version
131+
gameVersions.addAll "Java 21", "1.21.6-Snapshot", project.minecraft_version
132132
}
133133
}
134134

fabric/src/main/java/dev/architectury/mixin/fabric/client/MixinAbstractContainerScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void renderBackground(GuiGraphics graphics, int mouseX, int mouseY, float
4242
ClientGuiEvent.RENDER_CONTAINER_BACKGROUND.invoker().render((AbstractContainerScreen<?>) (Object) this, graphics, mouseX, mouseY, delta);
4343
}
4444

45-
@Inject(method = "render",
45+
@Inject(method = "renderContents",
4646
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screens/inventory/AbstractContainerScreen;renderLabels(Lnet/minecraft/client/gui/GuiGraphics;II)V",
4747
ordinal = 0, shift = At.Shift.AFTER))
4848
public void renderForeground(GuiGraphics graphics, int mouseX, int mouseY, float delta, CallbackInfo ci) {

fabric/src/main/java/dev/architectury/mixin/fabric/client/MixinGuiGraphics.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ public abstract class MixinGuiGraphics {
4242
@Unique
4343
private static ThreadLocal<TooltipEventPositionContextImpl> tooltipPositionContext = ThreadLocal.withInitial(TooltipEventPositionContextImpl::new);
4444

45-
@Inject(method = "renderTooltip(Lnet/minecraft/client/gui/Font;Lnet/minecraft/world/item/ItemStack;II)V", at = @At("HEAD"))
45+
@Inject(method = "setTooltipForNextFrame(Lnet/minecraft/client/gui/Font;Lnet/minecraft/world/item/ItemStack;II)V", at = @At("HEAD"))
4646
private void preRenderTooltipItem(Font font, ItemStack stack, int x, int y, CallbackInfo ci) {
4747
ClientTooltipEvent.additionalContexts().setItem(stack);
4848
}
4949

50-
@Inject(method = "renderTooltip(Lnet/minecraft/client/gui/Font;Lnet/minecraft/world/item/ItemStack;II)V", at = @At("RETURN"))
51-
private void postRenderTooltipItem(Font font, ItemStack stack, int x, int y, CallbackInfo ci) {
50+
@Inject(method = "renderTooltip", at = @At("RETURN"))
51+
private void postRenderTooltipItem(Font font, List<ClientTooltipComponent> list, int i, int j, ClientTooltipPositioner clientTooltipPositioner, ResourceLocation resourceLocation, CallbackInfo ci) {
5252
ClientTooltipEvent.additionalContexts().setItem(null);
5353
}
5454

55-
@Inject(method = "renderTooltipInternal", at = @At("HEAD"), cancellable = true)
55+
@Inject(method = "renderTooltip", at = @At("HEAD"), cancellable = true)
5656
private void renderTooltip(Font font, List<ClientTooltipComponent> list, int x, int y, ClientTooltipPositioner positioner, @Nullable ResourceLocation background, CallbackInfo ci) {
5757
if (!list.isEmpty()) {
5858
var positionContext = tooltipPositionContext.get();
@@ -65,13 +65,13 @@ private void renderTooltip(Font font, List<ClientTooltipComponent> list, int x,
6565
}
6666
}
6767

68-
@ModifyVariable(method = "renderTooltipInternal",
68+
@ModifyVariable(method = "renderTooltip",
6969
at = @At(value = "HEAD"), ordinal = 0, argsOnly = true)
7070
private int modifyTooltipX(int original) {
7171
return tooltipPositionContext.get().getTooltipX();
7272
}
7373

74-
@ModifyVariable(method = "renderTooltipInternal",
74+
@ModifyVariable(method = "renderTooltip",
7575
at = @At(value = "HEAD"), ordinal = 1, argsOnly = true)
7676
private int modifyTooltipY(int original) {
7777
return tooltipPositionContext.get().getTooltipY();

fabric/src/main/java/dev/architectury/networking/fabric/NetworkManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public <T extends CustomPacketPayload> void registerC2S(CustomPacketPayload.Type
5454
LOGGER.info("Registering C2S receiver with id {}", type.id());
5555
PayloadTypeRegistry.playC2S().register(type, codec);
5656
ServerPlayNetworking.registerGlobalReceiver(type, (payload, fabricContext) -> {
57-
var context = context(fabricContext.player(), fabricContext.player().server, false);
57+
var context = context(fabricContext.player(), fabricContext.player().getServer(), false);
5858
receiver.receive(payload, context);
5959
});
6060
}

fabric/src/main/java/dev/architectury/registry/client/rendering/fabric/RenderTypeRegistryImpl.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919

2020
package dev.architectury.registry.client.rendering.fabric;
2121

22-
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
23-
import net.minecraft.client.renderer.RenderType;
22+
import net.fabricmc.fabric.api.client.rendering.v1.BlockRenderLayerMap;
23+
import net.minecraft.client.renderer.chunk.ChunkSectionLayer;
2424
import net.minecraft.world.level.block.Block;
2525
import net.minecraft.world.level.material.Fluid;
2626

2727
public class RenderTypeRegistryImpl {
28-
public static void register(RenderType type, Block... blocks) {
29-
BlockRenderLayerMap.INSTANCE.putBlocks(type, blocks);
28+
public static void register(ChunkSectionLayer type, Block... blocks) {
29+
BlockRenderLayerMap.putBlocks(type, blocks);
3030
}
3131

32-
public static void register(RenderType type, Fluid... fluids) {
33-
BlockRenderLayerMap.INSTANCE.putFluids(type, fluids);
32+
public static void register(ChunkSectionLayer type, Fluid... fluids) {
33+
BlockRenderLayerMap.putFluids(type, fluids);
3434
}
3535
}

fabric/src/main/java/dev/architectury/registry/level/entity/trade/fabric/TradeRegistryImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static void registerVillagerTrade0(ResourceKey<VillagerProfession> profes
3434

3535
public static void registerTradeForWanderingTrader(TradeRegistry.WandererTradeType type, VillagerTrades.ItemListing... trades) {
3636
TradeOfferHelper.registerWanderingTraderOffers(builder -> {
37-
builder.addAll(switch (type) {
37+
builder.addOffersToPool(switch (type) {
3838
case BUYING_TRADES -> TradeOfferHelper.WanderingTraderOffersBuilder.BUY_ITEMS_POOL;
3939
case GENERIC_TRADES -> TradeOfferHelper.WanderingTraderOffersBuilder.SELL_COMMON_ITEMS_POOL;
4040
case RARE_TRADES -> TradeOfferHelper.WanderingTraderOffersBuilder.SELL_SPECIAL_ITEMS_POOL;

fabric/src/main/resources/fabric.mod.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
},
3535
"icon": "icon.png",
3636
"depends": {
37-
"minecraft": "~1.21.4-",
38-
"fabricloader": ">=0.15.11",
39-
"fabric-api": ">=0.100.0"
37+
"minecraft": "~1.21.6~",
38+
"fabricloader": ">=0.15.4",
39+
"fabric-api": ">=0.127.0"
4040
},
4141
"breaks": {
4242
"optifabric": "<1.13.0"

0 commit comments

Comments
 (0)