pufmat / attributesmod

A Minecraft mod that adds more attributes to the game.
GNU Lesser General Public License v3.0
2 stars 3 forks source link

Pufferfish Attributes mod and TinyInv Mod are not compatible due to "value is null" ? #4

Closed SecretSeptus closed 5 months ago

SecretSeptus commented 5 months ago

I am currently working on a modpack that involves extruded character progression and Pufferfish Attributes is the only mod that allows me to give players Fortune as an Attribute, however it also does not want to load the world when installed together with TinyInv, a mod that uses Attributes to dynamicaly control (reduce) player inventory size.

The game crashed whilst ticking player Error: java.lang.NullPointerException: Cannot invoke "net.puffish.attributesmod.mixin.EntityAttributeInstanceInvoker.invokeGetModifiersByOperation(net.minecraft.world.entity.ai.attributes.AttributeModifier$Operation)" because the return value of "net.puffish.attributesmod.util.Signed.value()" is null

Crash file crash-2024-05-31_16.37.41-server.txt

Cut out from the log file

[16:37:41] [Server thread/ERROR]: Encountered an unexpected exception net.minecraft.ReportedException: Ticking player at net.minecraft.server.network.ServerConnectionListener.m9721(ServerConnectionListener.java:145) ~[client-1.20.1-20230612.114412-srg.jar%23502!/:?] at net.minecraft.server.MinecraftServer.m5703(MinecraftServer.java:907) ~[client-1.20.1-20230612.114412-srg.jar%23502!/:?] at net.minecraft.server.MinecraftServer.m5705(MinecraftServer.java:814) ~[client-1.20.1-20230612.114412-srg.jar%23502!/:?] at net.minecraft.client.server.IntegratedServer.m5705(IntegratedServer.java:89) ~[client-1.20.1-20230612.114412-srg.jar%23502!/:?] at net.minecraft.server.MinecraftServer.m130011(MinecraftServer.java:661) ~[client-1.20.1-20230612.114412-srg.jar%23502!/:?] at net.minecraft.server.MinecraftServer.m206580(MinecraftServer.java:251) ~[client-1.20.1-20230612.114412-srg.jar%23502!/:?] at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: java.lang.NullPointerException: Cannot invoke "net.puffish.attributesmod.mixin.EntityAttributeInstanceInvoker.invokeGetModifiersByOperation(net.minecraft.world.entity.ai.attributes.AttributeModifier$Operation)" because the return value of "net.puffish.attributesmod.util.Signed.value()" is null at net.puffish.attributesmod.AttributesMod.applyAttributeModifiers(AttributesMod.java:170) ~[puffish_attributes-0.2.0-1.20-forge.jar%23444!/:?] at net.minecraft.world.entity.LivingEntity.localvar$ddn000$modifyVariableAtHeal(LivingEntity.java:13576) ~[client-1.20.1-20230612.114412-srg.jar%23502!/:?] at net.minecraft.world.entity.LivingEntity.m5634(LivingEntity.java) ~[client-1.20.1-20230612.114412-srg.jar%23502!/:?] at net.minecraft.world.entity.player.Player.sol_valheim$tick(Player.java:2833) ~[client-1.20.1-20230612.114412-srg.jar%23502!/:?] at net.minecraft.world.entity.player.Player.handler$zci000$onTick(Player.java:2787) ~[client-1.20.1-20230612.114412-srg.jar%23502!/:?] at net.minecraft.world.entity.player.Player.m8119(Player.java) ~[client-1.20.1-20230612.114412-srg.jar%23502!/:?] at net.minecraft.server.level.ServerPlayer.m9240(ServerPlayer.java:467) ~[client-1.20.1-20230612.114412-srg.jar%23502!/:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.m9933(ServerGamePacketListenerImpl.java:262) ~[client-1.20.1-20230612.114412-srg.jar%23502!/:?] at net.minecraft.network.Connection.m129483(Connection.java:263) ~[client-1.20.1-20230612.114412-srg.jar%23502!/:?] at net.minecraft.server.network.ServerConnectionListener.m9721(ServerConnectionListener.java:142) ~[client-1.20.1-20230612.114412-srg.jar%23502!/:?] ... 6 more

pufmat commented 5 months ago

The issue is actually caused by TinyInv which injects code in a way that isn't really compatible with other mods. I have just release version 0.3.0 that has a workaround for it.