fix: 修正 Mixin 回调参数类型为 CallbackInfoReturnable

placeStructure 有 int 返回值,@Inject 到 RETURN 时回调参数必须是 CallbackInfoReturnable<Integer> 而非 CallbackInfo,否则运行时 mixin 校验报 'Invalid descriptor' 并崩溃。
This commit is contained in:
AxTps committed 2026-10-03 16:52:34 +08:00
1 parent 3cd76bcbba
commit 5f1374bcc6
1 file changed
+2 -2
@@ -14,7 +14,7 @@ import net.minecraft.world.level.levelgen.structure.StructureStart;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
/**
@@ -36,7 +36,7 @@ public class PlaceCommandMixin {
private static void placemod$registerStructure(net.minecraft.commands.CommandSourceStack source,
net.minecraft.core.Holder.Reference<Structure> structureHolder,
net.minecraft.core.BlockPos pos,
CallbackInfo ci,
CallbackInfoReturnable<Integer> cir,
ServerLevel level,
Structure structure,
ChunkGenerator generator,