Blood Magic

Blood Magic

90M Downloads

Crash when using comparator next to blood altar (1.18.2)

Raidobw2 opened this issue ยท 2 comments

commented

Issue Description:

Crash when placing comparator next to blood altar to get current essence level

What happens:

The game crashes

What you expected to happen:

It to not crash

Steps to reproduce:

  1. Place bloodstone block
  2. Place altar
  3. Place archmage orb into altar
  4. Place redstone comparator facing away from altar

Log

https://pste.ch/masinasuve.md

Relevant crash info
---- Minecraft Crash Report ----
// Hi. I'm Minecraft, and I'm a crashaholic.

Time: 1/4/23, 8:12 AM
Description: Unexpected error

java.lang.NullPointerException: Cannot invoke "wayoftime.bloodmagic.core.data.SoulNetwork.getCurrentEssence()" because the return value of "wayoftime.bloodmagic.util.helper.NetworkHelper.getSoulNetwork(wayoftime.bloodmagic.core.data.Binding)" is null
	at wayoftime.bloodmagic.altar.BloodAltar.getAnalogSignalStrength(BloodAltar.java:796) ~[BloodMagic-1.18.2-3.2.6-41.jar%2372!/:1.18.2-3.2.6-41] {re:classloading,pl:rei_plugin_compatibilities:B}
	at wayoftime.bloodmagic.common.tile.TileAltar.getAnalogSignalStrength(TileAltar.java:249) ~[BloodMagic-1.18.2-3.2.6-41.jar%2372!/:1.18.2-3.2.6-41] {re:classloading,pl:rei_plugin_compatibilities:B}
	at wayoftime.bloodmagic.common.block.BlockAltar.m_6782_(BlockAltar.java:78) ~[BloodMagic-1.18.2-3.2.6-41.jar%2372!/:1.18.2-3.2.6-41] {re:classloading,pl:rei_plugin_compatibilities:B}
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.m_60674_(BlockBehaviour.java:548) ~[client-1.18.2-20220404.173914-srg.jar%23275!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:libx:random_tick_block,re:computing_frames,pl:accesstransformer:B,pl:rei_plugin_compatibilities:B,xf:fml:libx:random_tick_block,re:classloading,pl:accesstransformer:B,pl:rei_plugin_compatibilities:B,xf:fml:libx:random_tick_block,pl:mixin:APP:kubejs-common.mixins.json:BlockStateBaseMixin,pl:mixin:APP:immersiveengineering.mixins.json:coremods.AbstractBlockStateMixin,pl:mixin:APP:ferritecore.blockstatecache.mixin.json:BlockStateBaseMixin,pl:mixin:A}
	at net.minecraft.world.level.block.ComparatorBlock.m_7312_(ComparatorBlock.java:80) ~[client-1.18.2-20220404.173914-srg.jar%23275!/:?] {re:classloading,pl:rei_plugin_compatibilities:B}
	at net.minecraft.world.level.block.ComparatorBlock.m_51903_(ComparatorBlock.java:47) ~[client-1.18.2-20220404.173914-srg.jar%23275!/:?] {re:classloading,pl:rei_plugin_compatibilities:B}
	at net.minecraft.world.level.block.ComparatorBlock.m_51907_(ComparatorBlock.java:129) ~[client-1.18.2-20220404.173914-srg.jar%23275!/:?] {re:classloading,pl:rei_plugin_compatibilities:B}
	at net.minecraft.world.level.block.ComparatorBlock.m_6227_(ComparatorBlock.java:110) ~[client-1.18.2-20220404.173914-srg.jar%23275!/:?] {re:classloading,pl:rei_plugin_compatibilities:B}
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.m_60664_(BlockBehaviour.java:697) ~[client-1.18.2-20220404.173914-srg.jar%23275!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:libx:random_tick_block,re:computing_frames,pl:accesstransformer:B,pl:rei_plugin_compatibilities:B,xf:fml:libx:random_tick_block,re:classloading,pl:accesstransformer:B,pl:rei_plugin_compatibilities:B,xf:fml:libx:random_tick_block,pl:mixin:APP:kubejs-common.mixins.json:BlockStateBaseMixin,pl:mixin:APP:immersiveengineering.mixins.json:coremods.AbstractBlockStateMixin,pl:mixin:APP:ferritecore.blockstatecache.mixin.json:BlockStateBaseMixin,pl:mixin:A}
	at net.minecraft.client.multiplayer.MultiPlayerGameMode.m_105262_(MultiPlayerGameMode.java:296) ~[client-1.18.2-20220404.173914-srg.jar%23275!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:rei_plugin_compatibilities:B,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91277_(Minecraft.java:1573) ~[client-1.18.2-20220404.173914-srg.jar%23275!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:traylauncher:loadingHookCoremod,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:rei_plugin_compatibilities:B,xf:fml:traylauncher:loadingHookCoremod,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:balm.mixins.json:MinecraftMixin,pl:mixin:APP:tklib.mixin.json:client.MinecraftMixin,pl:mixin:APP:botania_xplat.mixins.json:client.AccessorMinecraft,pl:mixin:APP:ae2.mixins.json:PickColorMixin,pl:mixin:APP:ars_nouveau.mixins.json:light.ClientMixin,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:bookshelf.common.mixins.json:client.AccessorMinecraft,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:mixin.dynamic_asset_generator.json:MinecraftMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:APP:ars_nouveau.mixins.json:camera.MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91279_(Minecraft.java:1853) ~[client-1.18.2-20220404.173914-srg.jar%23275!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:traylauncher:loadingHookCoremod,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:rei_plugin_compatibilities:B,xf:fml:traylauncher:loadingHookCoremod,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:balm.mixins.json:MinecraftMixin,pl:mixin:APP:tklib.mixin.json:client.MinecraftMixin,pl:mixin:APP:botania_xplat.mixins.json:client.AccessorMinecraft,pl:mixin:APP:ae2.mixins.json:PickColorMixin,pl:mixin:APP:ars_nouveau.mixins.json:light.ClientMixin,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:bookshelf.common.mixins.json:client.AccessorMinecraft,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:mixin.dynamic_asset_generator.json:MinecraftMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:APP:ars_nouveau.mixins.json:camera.MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91398_(Minecraft.java:1670) ~[client-1.18.2-20220404.173914-srg.jar%23275!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:traylauncher:loadingHookCoremod,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:rei_plugin_compatibilities:B,xf:fml:traylauncher:loadingHookCoremod,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:balm.mixins.json:MinecraftMixin,pl:mixin:APP:tklib.mixin.json:client.MinecraftMixin,pl:mixin:APP:botania_xplat.mixins.json:client.AccessorMinecraft,pl:mixin:APP:ae2.mixins.json:PickColorMixin,pl:mixin:APP:ars_nouveau.mixins.json:light.ClientMixin,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:bookshelf.common.mixins.json:client.AccessorMinecraft,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:mixin.dynamic_asset_generator.json:MinecraftMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:APP:ars_nouveau.mixins.json:camera.MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1021) ~[client-1.18.2-20220404.173914-srg.jar%23275!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:traylauncher:loadingHookCoremod,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:rei_plugin_compatibilities:B,xf:fml:traylauncher:loadingHookCoremod,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:balm.mixins.json:MinecraftMixin,pl:mixin:APP:tklib.mixin.json:client.MinecraftMixin,pl:mixin:APP:botania_xplat.mixins.json:client.AccessorMinecraft,pl:mixin:APP:ae2.mixins.json:PickColorMixin,pl:mixin:APP:ars_nouveau.mixins.json:light.ClientMixin,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:bookshelf.common.mixins.json:client.AccessorMinecraft,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:mixin.dynamic_asset_generator.json:MinecraftMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:APP:ars_nouveau.mixins.json:camera.MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:665) ~[client-1.18.2-20220404.173914-srg.jar%23275!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:traylauncher:loadingHookCoremod,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:rei_plugin_compatibilities:B,xf:fml:traylauncher:loadingHookCoremod,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:balm.mixins.json:MinecraftMixin,pl:mixin:APP:tklib.mixin.json:client.MinecraftMixin,pl:mixin:APP:botania_xplat.mixins.json:client.AccessorMinecraft,pl:mixin:APP:ae2.mixins.json:PickColorMixin,pl:mixin:APP:ars_nouveau.mixins.json:light.ClientMixin,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:bookshelf.common.mixins.json:client.AccessorMinecraft,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:mixin.dynamic_asset_generator.json:MinecraftMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:APP:ars_nouveau.mixins.json:camera.MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:205) ~[client-1.18.2-20220404.173914-srg.jar%23275!/:?] {re:classloading,re:mixin,pl:runtimedistcleaner:A,pl:mixin:A,pl:runtimedistcleaner:A}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?] {}
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?] {}
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?] {}
	at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:31) ~[fmlloader-1.18.2-40.1.92.jar%2317!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.3.jar%235!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.3.jar%235!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.3.jar%235!/:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.3.jar%235!/:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.3.jar%235!/:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.3.jar%235!/:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.3.jar%235!/:?] {}
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?] {}
-- Head --
Thread: Render thread
Stacktrace:
	at wayoftime.bloodmagic.altar.BloodAltar.getAnalogSignalStrength(BloodAltar.java:796)
	at wayoftime.bloodmagic.common.tile.TileAltar.getAnalogSignalStrength(TileAltar.java:249)
	at wayoftime.bloodmagic.common.block.BlockAltar.m_6782_(BlockAltar.java:78)
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.m_60674_(BlockBehaviour.java:548)
	at net.minecraft.world.level.block.ComparatorBlock.m_7312_(ComparatorBlock.java:80)
	at net.minecraft.world.level.block.ComparatorBlock.m_51903_(ComparatorBlock.java:47)
	at net.minecraft.world.level.block.ComparatorBlock.m_51907_(ComparatorBlock.java:129)
	at net.minecraft.world.level.block.ComparatorBlock.m_6227_(ComparatorBlock.java:110)
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.m_60664_(BlockBehaviour.java:697)
	at net.minecraft.client.multiplayer.MultiPlayerGameMode.m_105262_(MultiPlayerGameMode.java:296)
	at net.minecraft.client.Minecraft.m_91277_(Minecraft.java:1573)
	at net.minecraft.client.Minecraft.m_91279_(Minecraft.java:1853)


Affected Versions (Do not use "latest"):

  • BloodMagic: BloodMagic-1.18.2-3.2.6-41.jar
  • Minecraft: 1.18.2
  • Forge: 40.1.92

Other info

altar

Reference: FTBTeam/FTB-Modpack-Issues#2454

Thanks a bunch in advance for checking this out!

commented

Just going to note my findings for when somebody gets around to fixing it:

A nullcheck needs to be added here:

return NetworkHelper.getSoulNetwork(binding).getCurrentEssence() * 15 / orb.getCapacity();

If called on the client, NetworkHelper.getSoulNetwork will return null since it can't get the BMWorldSavedData instance to read network data from.

I don't believe this method is usually called clientside, which is why it was probably never noticed before.

commented

Can confirm that it's still happening.

  • Minecraft: 1.20.1
  • Blood Magic: 1.20.1-3.3.2-44
  • Forge: 47.2.0
The game crashed whilst unexpected error
Error: java.lang.NullPointerException: Cannot invoke "wayoftime.bloodmagic.core.data.SoulNetwork.getCurrentEssence()" because the return value of "wayoftime.bloodmagic.util.helper.NetworkHelper.getSoulNetwork(wayoftime.bloodmagic.core.data.Binding)" is null