terrarium-earth / Heracles

A tree style questing mod allowing creators to set completable quests for their users
MIT License
35 stars 19 forks source link

[Bug]: NullPointerException with a dummy task #62

Closed SettingDust closed 1 year ago

SettingDust commented 1 year ago

Bug Description

https://github.com/terrarium-earth/Heracles/assets/19922286/a3832b46-a1a0-459e-83e0-c37a4103170c

[20:05:21] [Netty Acceptor IO Thread/ERROR] (ServerPlayNetworkAddon for SettingDust) Encountered exception while handling in channel with name "heracles:main/heracles/update_server_quest"
java.lang.NullPointerException: null
    at java.util.Objects.requireNonNull(Objects.java:208) ~[?:?]
    at java.util.Optional.of(Optional.java:113) ~[?:?]
    at com.mojang.datafixers.util.Either$Left.left(Either.java:54) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.DataResult.result(DataResult.java:75) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.MapCodec$7.apply(MapCodec.java:265) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.MapCodec$3.decode(MapCodec.java:186) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.codecs.RecordCodecBuilder$Instance$5.decode(RecordCodecBuilder.java:324) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.codecs.RecordCodecBuilder$2.decode(RecordCodecBuilder.java:107) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.MapDecoder.compressedDecode(MapDecoder.java:49) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.MapCodec$MapCodecCodec.decode(MapCodec.java:91) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.Decoder.parse(Decoder.java:18) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.codecs.KeyDispatchCodec.lambda$decode$3(KeyDispatchCodec.java:64) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.DataResult.lambda$flatMap$11(DataResult.java:139) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.DataResult.flatMap(DataResult.java:137) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.codecs.KeyDispatchCodec.lambda$decode$4(KeyDispatchCodec.java:58) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.DataResult.lambda$flatMap$11(DataResult.java:139) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.DataResult.flatMap(DataResult.java:137) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.codecs.KeyDispatchCodec.decode(KeyDispatchCodec.java:56) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.MapDecoder.compressedDecode(MapDecoder.java:49) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.MapCodec$MapCodecCodec.decode(MapCodec.java:91) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.Decoder.parse(Decoder.java:18) ~[datafixerupper-6.0.8.jar:?]
    at com.teamresourceful.resourcefullib.common.codecs.maps.DispatchMapCodec.lambda$decode$0(DispatchMapCodec.java:34) ~[transformed-mod-resourcefullib.i0:0/:?]
    at com.mojang.serialization.DataResult.lambda$flatMap$11(DataResult.java:139) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.DataResult.flatMap(DataResult.java:137) ~[datafixerupper-6.0.8.jar:?]
    at com.teamresourceful.resourcefullib.common.codecs.maps.DispatchMapCodec.lambda$decode$3(DispatchMapCodec.java:34) ~[transformed-mod-resourcefullib.i0:0/:?]
    at java.util.stream.ReduceOps$1ReducingSink.accept(ReduceOps.java:80) ~[?:?]
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
    at java.util.Iterator.forEachRemaining(Iterator.java:133) ~[?:?]
    at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845) ~[?:?]
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?]
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
    at java.util.stream.ReferencePipeline.reduce(ReferencePipeline.java:667) ~[?:?]
    at com.teamresourceful.resourcefullib.common.codecs.maps.DispatchMapCodec.decode(DispatchMapCodec.java:30) ~[transformed-mod-resourcefullib.i0:0/:?]
    at com.teamresourceful.resourcefullib.common.codecs.maps.DispatchMapCodec.lambda$decode$8(DispatchMapCodec.java:62) ~[transformed-mod-resourcefullib.i0:0/:?]
    at com.mojang.serialization.DataResult.lambda$flatMap$11(DataResult.java:139) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-6.0.8.jar:?]
    at com.mojang.serialization.DataResult.flatMap(DataResult.java:137) ~[datafixerupper-6.0.8.jar:?]
    at com.teamresourceful.resourcefullib.common.codecs.maps.DispatchMapCodec.decode(DispatchMapCodec.java:62) ~[transformed-mod-resourcefullib.i0:0/:?]
    at com.mojang.serialization.Decoder.parse(Decoder.java:18) ~[datafixerupper-6.0.8.jar:?]
    at earth.terrarium.heracles.common.utils.ModUtils.lambda$toByteCodec$11(ModUtils.java:164) ~[transformed-mod-heracles.i0:0/:?]
    at com.teamresourceful.bytecodecs.defaults.PassthroughCodec.decode(PassthroughCodec.java:18) ~[transformed-mod-com-teamresourceful-bytecodecs.i0:0/:?]
    at com.teamresourceful.bytecodecs.defaults.OptionalCodec.decode(OptionalCodec.java:24) ~[transformed-mod-com-teamresourceful-bytecodecs.i0:0/:?]
    at com.teamresourceful.bytecodecs.defaults.OptionalCodec.decode(OptionalCodec.java:9) ~[transformed-mod-com-teamresourceful-bytecodecs.i0:0/:?]
    at com.teamresourceful.bytecodecs.base.WrappedByteCodec.decode(WrappedByteCodec.java:16) ~[transformed-mod-com-teamresourceful-bytecodecs.i0:0/:?]
    at com.teamresourceful.bytecodecs.base.object.ObjectEncoders$Encoder5.decode(ObjectEncoders.java:106) ~[transformed-mod-com-teamresourceful-bytecodecs.i0:0/:?]
    at com.teamresourceful.bytecodecs.base.WrappedByteCodec.decode(WrappedByteCodec.java:16) ~[transformed-mod-com-teamresourceful-bytecodecs.i0:0/:?]
    at com.teamresourceful.bytecodecs.base.object.ObjectEncoders$Encoder2.decode(ObjectEncoders.java:40) ~[transformed-mod-com-teamresourceful-bytecodecs.i0:0/:?]
    at com.teamresourceful.resourcefullib.common.networking.base.CodecPacketHandler.decode(CodecPacketHandler.java:30) ~[transformed-mod-resourcefullib.i0:0/:?]
    at com.teamresourceful.resourcefullib.common.networking.fabric.PacketChannelHelperImpl.lambda$registerC2SPacket$1(PacketChannelHelperImpl.java:29) ~[transformed-mod-resourcefullib.i0:0/:?]
    at net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking$PlayChannelHandler.receive(ServerPlayNetworking.java:458) ~[transformed-mod-quilted-fabric-networking-api-v1.i0:0/:?]
    at org.quiltmc.qsl.networking.impl.server.ServerPlayNetworkAddon.receive(ServerPlayNetworkAddon.java:93) ~[transformed-mod-quilt-networking.i0:0/:?]
    at org.quiltmc.qsl.networking.impl.server.ServerPlayNetworkAddon.receive(ServerPlayNetworkAddon.java:41) ~[transformed-mod-quilt-networking.i0:0/:?]
    at org.quiltmc.qsl.networking.impl.AbstractChanneledNetworkAddon.handle(AbstractChanneledNetworkAddon.java:101) ~[transformed-mod-quilt-networking.i0:0/:?]
    at org.quiltmc.qsl.networking.impl.server.ServerPlayNetworkAddon.handle(ServerPlayNetworkAddon.java:88) ~[transformed-mod-quilt-networking.i0:0/:?]
    at net.minecraft.server.network.ServerPlayNetworkHandler.handler$hnh000$quilt_networking$handleCustomPayloadReceivedAsync(ServerPlayNetworkHandler.java:2000) ~[transformed-mod-minecraft.i0:0/:?]
    at net.minecraft.server.network.ServerPlayNetworkHandler.onCustomPayload(ServerPlayNetworkHandler.java) ~[transformed-mod-minecraft.i0:0/:?]
    at net.minecraft.network.packet.c2s.play.CustomPayloadC2SPacket.apply(CustomPayloadC2SPacket.java:38) ~[transformed-mod-minecraft.i0:0/:?]
    at net.minecraft.network.packet.c2s.play.CustomPayloadC2SPacket.apply(CustomPayloadC2SPacket.java:7) ~[transformed-mod-minecraft.i0:0/:?]
    at net.minecraft.network.ClientConnection.handlePacket(ClientConnection.java:175) ~[transformed-mod-minecraft.i0:0/:?]
    at net.minecraft.network.ClientConnection.channelRead0(ClientConnection.java:160) ~[transformed-mod-minecraft.i0:0/:?]
    at net.minecraft.network.ClientConnection.channelRead0(ClientConnection.java:52) ~[transformed-mod-minecraft.i0:0/:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
    at io.netty.channel.local.LocalChannel.readInbound(LocalChannel.java:299) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
    at io.netty.channel.local.LocalChannel.finishPeerRead0(LocalChannel.java:445) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
    at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:50) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
    at io.netty.channel.local.LocalChannel$5.run(LocalChannel.java:403) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
    at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]
[20:05:21] [Server thread/INFO] (Minecraft) SettingDust lost connection: Internal Exception: java.lang.NullPointerException

How to Reproduce?

No response

Expected Behavior

No response

Version

1.0.4

Mod Loader Version

1.20.1 0.20.1

Mod Loader

Quilt

Logs or additional context

https://mclo.gs/a6wDboZ

Code of Conduct