Game crash from NPE when player is shocked by Tesla coil
tehbeard opened this issue ยท 1 comments
Describe the bug
When the player is shocked by a Tesla coil, the game crashes out with the logs reporting a NullPointerException
from latest.log
[12:38:11] [Server thread/ERROR]: Encountered an unexpected exception
net.minecraft.ReportedException: Ticking block entity
at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:870) ~[client-1.19.2-20220805.130853-srg.jar%23375!/:?]
at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:806) ~[client-1.19.2-20220805.130853-srg.jar%23375!/:?]
at net.minecraft.client.server.IntegratedServer.m_5705_(IntegratedServer.java:84) ~[client-1.19.2-20220805.130853-srg.jar%23375!/:?]
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:654) ~[client-1.19.2-20220805.130853-srg.jar%23375!/:?]
at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:244) ~[client-1.19.2-20220805.130853-srg.jar%23375!/:?]
at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: java.lang.NullPointerException: Registry Object not present: createaddition:shocking
at java.util.Objects.requireNonNull(Unknown Source) ~[?:?]
at net.minecraftforge.registries.RegistryObject.get(RegistryObject.java:204) ~[forge-1.19.2-43.2.4-universal.jar%23380!/:?]
at com.mrh0.createaddition.blocks.tesla_coil.TeslaCoilTileEntity.doDmg(TeslaCoilTileEntity.java:122) ~[createaddition-1.19.2-20230313a.jar%23288!/:1.19.2-20230313a]
at com.mrh0.createaddition.blocks.tesla_coil.TeslaCoilTileEntity.tick(TeslaCoilTileEntity.java:146) ~[createaddition-1.19.2-20230313a.jar%23288!/:1.19.2-20230313a]
at com.simibubi.create.foundation.tileEntity.SmartTileEntityTicker.m_155252_(SmartTileEntityTicker.java:15) ~[create-1.19.2-0.5.0.i.jar%23280!/:0.5.0.i]
at net.minecraft.world.level.chunk.LevelChunk$BoundTickingBlockEntity.m_142224_(LevelChunk.java:687) ~[client-1.19.2-20220805.130853-srg.jar%23375!/:?]
at net.minecraft.world.level.chunk.LevelChunk$RebindableTickingBlockEntityWrapper.m_142224_(LevelChunk.java:780) ~[client-1.19.2-20220805.130853-srg.jar%23375!/:?]
at net.minecraft.world.level.Level.m_46463_(Level.java:446) ~[client-1.19.2-20220805.130853-srg.jar%23375!/:?]
at net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:331) ~[client-1.19.2-20220805.130853-srg.jar%23375!/:?]
at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:866) ~[client-1.19.2-20220805.130853-srg.jar%23375!/:?]
... 5 more
Full crash file:
crash-2023-03-15_12.38.11-server.txt
To Reproduce
Place and power a tesla coil. Give it a redstone signal to trigger the damage effect.
Additional context
- Mod version: 1.19.2-20230313a
- Forge version: 43.2.4
- Create version: 1.19.2-0.5.0.i
Edit: Have also tested with just Create and Create Crafts & Additions enabled, same result.