[0.2.41] allthemodium teleport pad does not drop item or teleport to Other
jkwphysics opened this issue ยท 3 comments
On server or single player, there seems to be an error with a null target world when trying to use the teleport pad. There is no crash, just an error in the running log when sneak right clicking on the pad.
[19:18:29] [Server thread/FATAL]: Error executing task on Server java.lang.NullPointerException: Cannot invoke "net.minecraft.server.level.ServerLevel.m_8055_(net.minecraft.core.BlockPos)" because "targetWorld" is null at com.thevortex.allthemodium.blocks.TeleportPad.transferPlayer(TeleportPad.java:117) ~[allthemodium-1.7.0rc6-1.18.1-39.0.10.jar%2357!/:1.7.0rc6-1.18.1-39.0.10] at com.thevortex.allthemodium.blocks.TeleportPad.m_6227_(TeleportPad.java:60) ~[allthemodium-1.7.0rc6-1.18.1-39.0.10.jar%2357!/:1.7.0rc6-1.18.1-39.0.10] at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.m_60664_(BlockBehaviour.java:695) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at net.minecraft.server.level.ServerPlayerGameMode.m_7179_(ServerPlayerGameMode.java:335) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.m_6371_(ServerGamePacketListenerImpl.java:975) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.m_5797_(ServerboundUseItemOnPacket.java:30) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.m_5797_(ServerboundUseItemOnPacket.java:8) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at net.minecraft.network.protocol.PacketUtils.m_131356_(PacketUtils.java:21) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:151) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:765) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:161) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:125) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:748) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:742) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at net.minecraft.util.thread.BlockableEventLoop.m_18701_(BlockableEventLoop.java:134) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:728) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:672) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:258) ~[client-1.18.1-20211210.034407-srg.jar%23243!/:?] at java.lang.Thread.run(Thread.java:833) [?:?]
I think the pad not dropping is a bug but it may be intentional, though when sneak right-clicking the the pad you can't be holding anything in either hand. So both your offhand and your main hand have to be empty to teleport.
I can confirm that both hands are empty when this error occurs, while sneak right clicking. It seems like the reference to the Other is null.