Forgified Fabric API

Forgified Fabric API

13M Downloads

Mixin Injection Error in Villager Trades: ItemStack vs Item Type Mismatch

LMaxRouterCN opened this issue · 6 comments

commented

Minecraft version

1.20.1 (LTS)

Describe the bug

Game crash

Steps to reproduce

  1. Right-click a master-level fishing villager.
  2. Crash.

Logs

https://mclo.gs/wQrvDF5

Additional context

Description: Unexpected error

org.spongepowered.asm.mixin.injection.throwables.InjectionError: LVT in net/minecraft/world/entity/npc/VillagerTrades$EmeraldsForVillagerTypeItem::m_213663_(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/util/RandomSource;)Lnet/minecraft/world/item/trading/MerchantOffer; has incompatible changes at opcode 34 in callback fabric-object-builder-v1.mixins.json:TradeOffersTypeAwareBuyForOneEmeraldFactoryMixin from mod fabric_object_builder_api_v1->@Inject::failOnNullItem(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/util/RandomSource;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfoReturnable;Lnet/minecraft/world/item/ItemStack;)V.
 Expected: [Lnet/minecraft/world/item/ItemStack;]
    Found: [Lnet/minecraft/world/item/Item;]
Available: [Lnet/minecraft/world/item/Item;, Lnet/minecraft/world/item/ItemStack;]
	at net.minecraft.world.entity.npc.VillagerTrades$EmeraldsForVillagerTypeItem.handler$dag000$fabric_object_builder_api_v1$failOnNullItem$missing(VillagerTrades.java) ~[client-1.20.1-20230612.114412-srg.jar%23948!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:connector_pre_launch:A}
	at net.minecraft.world.entity.npc.VillagerTrades$EmeraldsForVillagerTypeItem.m_213663_(VillagerTrades.java:172) ~[client-1.20.1-20230612.114412-srg.jar%23948!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:connector_pre_launch:A}
	at net.minecraft.world.entity.npc.AbstractVillager.m_35277_(AbstractVillager.java:221) ~[client-1.20.1-20230612.114412-srg.jar%23948!/:?] {re:mixin,pl:connector_pre_launch:A,re:classloading,pl:mixin:APP:dynamiccrosshair-forge.mixins.json:entity.MerchantEntityMixin from mod dynamiccrosshair,pl:mixin:APP:curtain.mixins.json:rules.super_lead.AbstractVillagerMixin from mod curtain,pl:mixin:A,pl:connector_pre_launch:A}
	at net.minecraft.world.entity.npc.Villager.m_7604_(Villager.java:789) ~[client-1.20.1-20230612.114412-srg.jar%23948!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:forge:forge_method_redirector,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,xf:fml:forge:forge_method_redirector,pl:mixin:APP:kiwi.mixins.json:VillagerAccess from mod kiwi,pl:mixin:APP:majruszlibrary-common.mixins.json:MixinVillager from mod majruszlibrary,pl:mixin:APP:fabric-content-registries-v0.mixins.json:VillagerEntityAccessor from mod fabric_content_registries_v0,pl:mixin:APP:tradingpost.common.mixins.json:accessor.VillagerAccessor from mod tradingpost,pl:mixin:APP:add_potion.mixins.json:VillagerMixin from mod add_potion,pl:mixin:APP:moonlight-common.mixins.json:VillagerMixin from mod moonlight,pl:mixin:A,pl:connector_pre_launch:A}
	at net.minecraft.world.entity.npc.AbstractVillager.m_6616_(AbstractVillager.java:99) ~[client-1.20.1-20230612.114412-srg.jar%23948!/:?] {re:mixin,pl:connector_pre_launch:A,re:classloading,pl:mixin:APP:dynamiccrosshair-forge.mixins.json:entity.MerchantEntityMixin from mod dynamiccrosshair,pl:mixin:APP:curtain.mixins.json:rules.super_lead.AbstractVillagerMixin from mod curtain,pl:mixin:A,pl:connector_pre_launch:A}
	at net.minecraft.world.entity.npc.Villager.m_6071_(Villager.java:263) ~[client-1.20.1-20230612.114412-srg.jar%23948!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:forge:forge_method_redirector,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,xf:fml:forge:forge_method_redirector,pl:mixin:APP:kiwi.mixins.json:VillagerAccess from mod kiwi,pl:mixin:APP:majruszlibrary-common.mixins.json:MixinVillager from mod majruszlibrary,pl:mixin:APP:fabric-content-registries-v0.mixins.json:VillagerEntityAccessor from mod fabric_content_registries_v0,pl:mixin:APP:tradingpost.common.mixins.json:accessor.VillagerAccessor from mod tradingpost,pl:mixin:APP:add_potion.mixins.json:VillagerMixin from mod add_potion,pl:mixin:APP:moonlight-common.mixins.json:VillagerMixin from mod moonlight,pl:mixin:A,pl:connector_pre_launch:A}
	at net.minecraft.world.entity.Mob.m_6096_(Mob.java:1122) ~[client-1.20.1-20230612.114412-srg.jar%23948!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,re:computing_frames,pl:accesstransformer:B,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:gunsmithlib.mixins.json:MixinMob from mod gunsmithlib,pl:mixin:APP:dynamiccrosshair-forge.mixins.json:entity.MobEntityMixin from mod dynamiccrosshair,pl:mixin:APP:lithium.mixins.json:entity.inactive_navigations.MobEntityMixin from mod radium,pl:mixin:APP:lithium.mixins.json:entity.skip_equipment_change_check.MobEntityMixin from mod radium,pl:mixin:APP:bookshelf.common.mixins.json:accessors.entity.AccessorMob from mod bookshelf,pl:mixin:APP:curtain.mixins.json:rules.super_lead.MobMixin from mod curtain,pl:mixin:APP:fabric-entity-events-v1.mixins.json:MobEntityMixin from mod fabric_entity_events_v1,pl:mixin:APP:majruszlibrary-common.mixins.json:IMixinMob from mod majruszlibrary,pl:mixin:APP:majruszlibrary-common.mixins.json:MixinMob from mod majruszlibrary,pl:mixin:APP:mixins.epicfight.json:MixinMob from mod epicfight,pl:mixin:APP:moonlight-common.mixins.json:EntityMixin from mod moonlight,pl:mixin:APP:vsch.mixins.json:MixinMob from mod vsch,pl:mixin:A,pl:connector_pre_launch:A}
	at net.minecraft.world.entity.player.Player.m_36157_(Player.java:982) ~[client-1.20.1-20230612.114412-srg.jar%23948!/:?] {re:computing_frames,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_playerentity_iswearing,xf:fml:xaeroworldmap:xaero_wm_playerentity_iswearing,pl:connector_pre_launch:A,re:mixin,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_playerentity_iswearing,xf:fml:xaeroworldmap:xaero_wm_playerentity_iswearing,pl:connector_pre_launch:A,re:classloading,pl:accesstransformer:B,xf:fml:xaerominimap:xaero_playerentity_iswearing,xf:fml:xaeroworldmap:xaero_wm_playerentity_iswearing,pl:mixin:APP:tweakerge.mixins.json:MixinPlayerEntity from mod tweakerge,pl:mixin:APP:attributeslib.mixins.json:PlayerMixin from mod attributeslib,pl:mixin:APP:bigglobe.mixins.json:PlayerEntity_FlyInHyperspace from mod bigglobe,pl:mixin:APP:bigglobe.mixins.json:PlayerEntity_TrackWaypoints from mod bigglobe,pl:mixin:APP:valkyrienskies-common.mixins.json:feature.entity_collision.MixinPlayer from mod valkyrienskies,pl:mixin:APP:valkyrienskies-common.mixins.json:world.entity.MixinPlayer from mod valkyrienskies,pl:mixin:APP:valkyrienskies-common.mixins.json:client.player.MixinPlayer from mod valkyrienskies,pl:mixin:APP:firstperson.mixins.json:PlayerMixin from mod firstperson,pl:mixin:APP:carryon.mixins.json:PlayerMixin from mod carryon,pl:mixin:APP:entity_model_features-common.mixins.json:MixinPlayerEntity from mod entity_model_features,pl:mixin:APP:entity_texture_features-common.mixins.json:entity.misc.MixinPlayerEntity from mod entity_texture_features,pl:mixin:APP:touhou_little_maid.mixins.json:PlayerMixin from mod touhou_little_maid,pl:mixin:APP:curtain.mixins.json:rules.anti_cheat_disabled.PlayerMixin from mod curtain,pl:mixin:APP:curtain.mixins.json:rules.creative_no_clip.PlayerMixin from mod curtain,pl:mixin:APP:curtain.mixins.json:rules.xp_no_cooldown.PlayerMixin from mod curtain,pl:mixin:APP:littletiles.mixins.json:common.entity.PlayerBedMixin from mod littletiles,pl:mixin:APP:do_a_barrel_roll.mixins.json:roll.entity.PlayerEntityMixin from mod do_a_barrel_roll,pl:mixin:APP:do_a_barrel_roll.mixins.json:client.PlayerEntityMixin from mod do_a_barrel_roll,pl:mixin:APP:fabric-entity-events-v1.mixins.json:PlayerEntityMixin from mod fabric_entity_events_v1,pl:mixin:APP:fabric-entity-events-v1.mixins.json:elytra.PlayerEntityMixin from mod fabric_entity_events_v1,pl:mixin:APP:jlme.mixins.json:PlayerMixin from mod jlme,pl:mixin:APP:mixins.brandonscore.json:PlayerMixin from mod brandonscore,pl:mixin:APP:majruszlibrary-common.mixins.json:MixinPlayer from mod majruszlibrary,pl:mixin:APP:createbigcannons-common.mixins.json:PlayerMixin from mod createbigcannons,pl:mixin:APP:mixins.epicfight.json:MixinPlayer from mod epicfight,pl:mixin:APP:railways-common.mixins.json:MixinPlayer from mod railways,pl:mixin:APP:railways-common.mixins.json:PlayerEntityMixin from mod railways,pl:mixin:APP:dummmmmmy-common.mixins.json:PlayerMixin from mod dummmmmmy,pl:mixin:APP:mixins.sodiumdynamiclights.json:lightsource.PlayerEntityMixin from mod (unknown),pl:mixin:APP:expandedstorage-common.mixins.json:common.SpectatorEntityInventoryViewingFix from mod expandedstorage,pl:mixin:APP:vs_clockwork-common.mixins.json:MixinPlayer from mod vs_clockwork,pl:mixin:APP:parcool.mixins.json:common.PlayerMixin from mod parcool,pl:mixin:APP:universalenchants.forge.mixins.json:PlayerMixinForge from mod universalenchants,pl:mixin:APP:create_enchantment_industry.mixins.json:PlayerMixin from mod create_enchantment_industry,pl:mixin:APP:kubejs-common.mixins.json:PlayerMixin from mod kubejs,pl:mixin:APP:immersive_aircraft.mixins.json:PlayerEntityMixin from mod immersive_aircraft,pl:mixin:A,pl:connector_pre_launch:A}
	at net.minecraft.client.multiplayer.MultiPlayerGameMode.m_105226_(MultiPlayerGameMode.java:405) ~[client-1.20.1-20230612.114412-srg.jar%23948!/:?] {re:mixin,pl:accesstransformer:B,pl:connector_pre_launch:A,pl:runtimedistcleaner:A,re:computing_frames,pl:accesstransformer:B,pl:connector_pre_launch:A,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:connector_pre_launch:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91277_(Minecraft.java:1684) ~[client-1.20.1-20230612.114412-srg.jar%23948!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick_render_call,xf:fml:customskinloader:MinecraftTransformer,xf:fml:xaerominimap:xaero_minecraftclient,xf:fml:xaeroworldmap:xaero_wm_minecraftclient,pl:connector_pre_launch:A,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick_render_call,xf:fml:customskinloader:MinecraftTransformer,xf:fml:xaerominimap:xaero_minecraftclient,xf:fml:xaeroworldmap:xaero_wm_minecraftclient,pl:mixin:A,pl:connector_pre_launch:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91279_(Minecraft.java:1976) ~[client-1.20.1-20230612.114412-srg.jar%23948!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick_render_call,xf:fml:customskinloader:MinecraftTransformer,xf:fml:xaerominimap:xaero_minecraftclient,xf:fml:xaeroworldmap:xaero_wm_minecraftclient,pl:connector_pre_launch:A,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick_render_call,xf:fml:customskinloader:MinecraftTransformer,xf:fml:xaerominimap:xaero_minecraftclient,xf:fml:xaeroworldmap:xaero_wm_minecraftclient,pl:mixin:A,pl:connector_pre_launch:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91398_(Minecraft.java:1795) ~[client-1.20.1-20230612.114412-srg.jar%23948!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick_render_call,xf:fml:customskinloader:MinecraftTransformer,xf:fml:xaerominimap:xaero_minecraftclient,xf:fml:xaeroworldmap:xaero_wm_minecraftclient,pl:connector_pre_launch:A,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick_render_call,xf:fml:customskinloader:MinecraftTransformer,xf:fml:xaerominimap:xaero_minecraftclient,xf:fml:xaeroworldmap:xaero_wm_minecraftclient,pl:mixin:A,pl:connector_pre_launch:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1112) ~[client-1.20.1-20230612.114412-srg.jar%23948!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick_render_call,xf:fml:customskinloader:MinecraftTransformer,xf:fml:xaerominimap:xaero_minecraftclient,xf:fml:xaeroworldmap:xaero_wm_minecraftclient,pl:connector_pre_launch:A,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick_render_call,xf:fml:customskinloader:MinecraftTransformer,xf:fml:xaerominimap:xaero_minecraftclient,xf:fml:xaeroworldmap:xaero_wm_minecraftclient,pl:mixin:A,pl:connector_pre_launch:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:718) ~[client-1.20.1-20230612.114412-srg.jar%23948!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick_render_call,xf:fml:customskinloader:MinecraftTransformer,xf:fml:xaerominimap:xaero_minecraftclient,xf:fml:xaeroworldmap:xaero_wm_minecraftclient,pl:connector_pre_launch:A,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick,xf:fml:xaeroworldmap:xaero_wm_minecraft_runtick_render_call,xf:fml:customskinloader:MinecraftTransformer,xf:fml:xaerominimap:xaero_minecraftclient,xf:fml:xaeroworldmap:xaero_wm_minecraftclient,pl:mixin:A,pl:connector_pre_launch:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:218) ~[工业革命:2040.jar:?] {re:mixin,pl:connector_pre_launch:A,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:flywheel.mixins.json:ClientMainMixin from mod flywheel,pl:mixin:APP:screenshot_viewer.mixins.json:MainMixin from mod screenshot_viewer,pl:mixin:A,pl:connector_pre_launch:A,pl:runtimedistcleaner:A}
	at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?] {}
	at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?] {re:mixin}
	at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) ~[fmlloader-1.20.1-47.4.0.jar:?] {}
	at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:99) ~[fmlloader-1.20.1-47.4.0.jar:?] {}
	at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$makeService$0(CommonClientLaunchHandler.java:25) ~[fmlloader-1.20.1-47.4.0.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?] {}
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?] {}
	at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?] {}
	at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?] {re:mixin}
	at oolloo.jlw.Wrapper.invokeMain(Wrapper.java:112) ~[?:?] {}
	at oolloo.jlw.Wrapper.main(Wrapper.java:105) ~[?:?] {}

This issue is only related to the Sinytra Connector and FFAPI itself, should it be because of the forge version? The forge version 47.3.12 does not have this problem.

commented

这个问题在 1 月份通过 #191 得到修复,并在 2 月份发布为 v0.92.2+1.11.11+1.20.1。请更新到最新版本的 Forgified Fabric API。

信雅互联用fabric-api-0.92.2+1.11.12+1.20.1测试.jar

如果您使用的是非官方版本的 FFAPI,我们无法提供帮助。

I have a same questione,it doesn't fix until now

commented

same error here (no crash report but i see this exact message in the logs alot)

commented

I created a Minecraft copy that only contains Sinytra Connector and FFAPI, this is the new crash report.

crash-2025-05-21_19.59.58-client.txt
latest.log

commented

This is a third-party fix release.

same error here (no crash report but i see this exact message in the logs alot)

commented

This was fixed with #191 in January, and published as v0.92.2+1.11.11+1.20.1 in February. Please update to the latest version of Forgified Fabric API.

信雅互联用fabric-api-0.92.2+1.11.12+1.20.1测试.jar

We cannot help if you are using an unofficial version of FFAPI.

commented

This was fixed with #191 in January, and published as v0.92.2+1.11.11+1.20.1 in February. Please update to the latest version of Forgified Fabric API.

信雅互联用fabric-api-0.92.2+1.11.12+1.20.1测试.jar

We cannot help if you are using an unofficial version of FFAPI.

Absolutely no fix. Until now.