From aae9640655415ff734be43fa1ff7ffaf723d1abe Mon Sep 17 00:00:00 2001 From: gnembon Date: Wed, 28 May 2025 22:20:19 +0200 Subject: [PATCH] 1.21.6 pre 1 --- gradle.properties | 4 ++-- .../mixins/Connection_packetCounterMixin.java | 3 ++- .../mixins/ServerPlayer_scarpetEventMixin.java | 4 ++-- .../mixins/StructureBlockEntity_limitsMixin.java | 13 +++++++++---- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/gradle.properties b/gradle.properties index 77b563a4..7f65c5c8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check https://fabricmc.net/develop/ - minecraft_version=25w21a + minecraft_version=1.21.6-pre1 loader_version=0.16.10 jsr305_version=3.0.2 fabric_version=0.119.5+1.21.5 @@ -17,7 +17,7 @@ org.gradle.jvmargs=-Xmx1G # The Curseforge versions "names" or ids for the main branch (comma separated: 1.16.4,1.16.5) # This is needed because CF uses too vague names for prereleases and release candidates # Can also be the version ID directly coming from https://minecraft.curseforge.com/api/game/versions?token=[API_TOKEN] - release-curse-versions = Minecraft 1.21:1.21.5-Snapshot + release-curse-versions = Minecraft 1.21:1.21.6-Snapshot # Whether or not to build another branch on release release-extra-branch = false # The name of the second branch to release diff --git a/src/main/java/carpet/mixins/Connection_packetCounterMixin.java b/src/main/java/carpet/mixins/Connection_packetCounterMixin.java index c7159e73..3be41624 100644 --- a/src/main/java/carpet/mixins/Connection_packetCounterMixin.java +++ b/src/main/java/carpet/mixins/Connection_packetCounterMixin.java @@ -3,6 +3,7 @@ package carpet.mixins; import carpet.fakes.ClientConnectionInterface; import carpet.logging.logHelpers.PacketCounter; import io.netty.channel.Channel; +import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelHandlerContext; import io.netty.util.concurrent.Future; import io.netty.util.concurrent.GenericFutureListener; @@ -28,7 +29,7 @@ public abstract class Connection_packetCounterMixin implements ClientConnectionI // Add to the packet counter whenever a packet is sent. @Inject(method = "sendPacket", at = @At("HEAD")) - private void packetOutCount(final Packet packet, final PacketSendListener packetSendListener, final boolean bl, final CallbackInfo ci) + private void packetOutCount(Packet packet, ChannelFutureListener channelFutureListener, boolean bl, CallbackInfo ci) { PacketCounter.totalOut++; } diff --git a/src/main/java/carpet/mixins/ServerPlayer_scarpetEventMixin.java b/src/main/java/carpet/mixins/ServerPlayer_scarpetEventMixin.java index 2a0e7e49..372a01b0 100644 --- a/src/main/java/carpet/mixins/ServerPlayer_scarpetEventMixin.java +++ b/src/main/java/carpet/mixins/ServerPlayer_scarpetEventMixin.java @@ -38,8 +38,8 @@ public abstract class ServerPlayer_scarpetEventMixin extends Player implements S @Unique private boolean isInvalidReference = false; - public ServerPlayer_scarpetEventMixin(Level level, BlockPos blockPos, float f, GameProfile gameProfile) { - super(level, blockPos, f, gameProfile); + public ServerPlayer_scarpetEventMixin(Level level, GameProfile gameProfile) { + super(level, gameProfile); } //@Shadow protected abstract void completeUsingItem(); diff --git a/src/main/java/carpet/mixins/StructureBlockEntity_limitsMixin.java b/src/main/java/carpet/mixins/StructureBlockEntity_limitsMixin.java index 84081048..cf47efba 100644 --- a/src/main/java/carpet/mixins/StructureBlockEntity_limitsMixin.java +++ b/src/main/java/carpet/mixins/StructureBlockEntity_limitsMixin.java @@ -9,6 +9,9 @@ import org.spongepowered.asm.mixin.injection.Constant; import org.spongepowered.asm.mixin.injection.ModifyArg; import org.spongepowered.asm.mixin.injection.ModifyConstant; +import java.util.List; +import java.util.stream.Stream; + @Mixin(StructureBlockEntity.class) public abstract class StructureBlockEntity_limitsMixin { @@ -29,14 +32,16 @@ public abstract class StructureBlockEntity_limitsMixin } @ModifyArg( - method = "saveStructure(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/core/BlockPos;Lnet/minecraft/core/Vec3i;ZLjava/lang/String;Z)Z", + method = "saveStructure(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/core/BlockPos;Lnet/minecraft/core/Vec3i;ZLjava/lang/String;ZLjava/util/List;)Z", at = @At( value = "INVOKE", - target = "Lnet/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate;fillFromWorld(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;Lnet/minecraft/core/Vec3i;ZLnet/minecraft/world/level/block/Block;)V" + target = "Lnet/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate;fillFromWorld(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;Lnet/minecraft/core/Vec3i;ZLjava/util/List;)V" ), index = 4 ) - private static Block ignoredBlock(Block original) { - return CarpetSettings.structureBlockIgnoredBlock; + private static List ignoredBlock(List original) { + if (original.contains(CarpetSettings.structureBlockIgnoredBlock)) + return original; + return Stream.concat(original.stream(), Stream.of(CarpetSettings.structureBlockIgnoredBlock)).toList(); } }