Lauriethefish / BetterPortals

My plugin version of the popular BetterPortals mod which has many limitations, but requires no client side code
zlib License
68 stars 35 forks source link

Field index out of bounds when modifying entity spawn rotation #152

Closed tensiyoka closed 2 years ago

tensiyoka commented 2 years ago

Describe the bug Plugin just crashes @ start of server load.

To Reproduce How would I make this bug happen in order to fix it?

Server Logs Please enable debug logging by setting logLevel in the config file to FINER, then running /bp reload. Try to reproduce your issue, then send your full server log here.

If you can't do this for security reasons, an excerpt of log will probably suffice.

Additional context Plugin Version:0.12.0 Game Version: 1.19


10.07 03:46:20 [Server] WARN Loaded class com.lauriethefish.betterportals.bukkit.entity.faking.EntityPacketManipulator from BetterPortals v0.12.0 which is not a depend or softdepend of this plugin.
10.07 03:46:20 [Server] ERROR A critical error occurred during plugin execution.
10.07 03:46:20 [Server] ERROR Please create an issue at https://github.com/Lauriethefish/BetterPortals/issues to get this fixed.
10.07 03:46:20 [Server] WARN FieldAccessException: Field index out of bounds. (Index: 6, Size: 5)
10.07 03:46:20 [Server] WARN at ProtocolLib.jar//com.comphenix.protocol.reflect.StructureModifier.readInternal(StructureModifier.java:220)
10.07 03:46:20 [Server] WARN at ProtocolLib.jar//com.comphenix.protocol.reflect.StructureModifier.read(StructureModifier.java:195)
10.07 03:46:20 [Server] WARN at BetterPortals-0.12.0.jar//com.lauriethefish.betterportals.bukkit.entity.faking.EntityPacketManipulator.setSpawnRotation(EntityPacketManipulator.java:125)
10.07 03:46:20 [Server] WARN at BetterPortals-0.12.0.jar//com.lauriethefish.betterportals.bukkit.entity.faking.EntityPacketManipulator.showEntity(EntityPacketManipulator.java:59)
10.07 03:46:20 [Server] WARN at BetterPortals-0.12.0.jar//com.lauriethefish.betterportals.bukkit.entity.faking.IEntityPacketManipulator.showEntity(IEntityPacketManipulator.java:28)
10.07 03:46:20 [Server] WARN at BetterPortals-0.12.0.jar//com.lauriethefish.betterportals.bukkit.entity.faking.EntityTracker.addTracking(EntityTracker.java:157)
10.07 03:46:20 [Server] WARN at BetterPortals-0.12.0.jar//com.lauriethefish.betterportals.bukkit.entity.faking.EntityTrackingManager.setTracking(EntityTrackingManager.java:43)
10.07 03:46:20 [Server] WARN at BetterPortals-0.12.0.jar//com.lauriethefish.betterportals.bukkit.player.view.entity.PlayerEntityView.updateReplicatedEntities(PlayerEntityView.java:89)
10.07 03:46:20 [Server] ERROR Packet encoding of packet ID 48 threw (skippable? true)
10.07 03:46:20 [Server] INFO java.lang.NullPointerException: Cannot invoke "java.time.Instant.toEpochMilli()" because "instant" is null
10.07 03:46:20 [Server] INFO at net.minecraft.network.FriendlyByteBuf.writeInstant(FriendlyByteBuf.java:697) ~[?:?]
10.07 03:46:20 [Server] INFO at net.minecraft.network.protocol.game.ClientboundPlayerChatPacket.write(ClientboundPlayerChatPacket.java:49) ~[paper-1.19.jar:git-Paper-4]
10.07 03:46:20 [Server] INFO at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:41) ~[paper-1.19.jar:git-Paper-4]
10.07 03:46:20 [Server] INFO at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:14) ~[paper-1.19.jar:git-Paper-4]
10.07 03:46:20 [Server] INFO at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.77.Final.jar:4.1.77.Final]
10.07 03:46:20 [Server] INFO at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
10.07 03:46:20 [Server] INFO at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
10.07 03:46:20 [Server] INFO at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
10.07 03:46:20 [Server] INFO at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
10.07 03:46:20 [Server] INFO at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120) ~[netty-codec-4.1.77.Final.jar:4.1.77.Final]
10.07 03:46:20 [Server] INFO at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
10.07 03:46:20 [Server] INFO at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
10.07 03:46:20 [Server] INFO at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
10.07 03:46:20 [Server] INFO at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
10.07 03:46:20 [Server] INFO at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1020) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
10.07 03:46:20 [Server] INFO at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:311) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
10.07 03:46:20 [Server] INFO at com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:227) ~[ProtocolLib.jar:?]
10.07 03:46:20 [Server] INFO at com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:233) ~[ProtocolLib.jar:?]
10.07 03:46:20 [Server] INFO at net.minecraft.network.Connection.doSendPacket(Connection.java:463) ~[?:?]
10.07 03:46:20 [Server] INFO at net.minecraft.network.Connection.lambda$writePacket$11(Connection.java:437) ~[?:?]
10.07 03:46:20 [Server] INFO at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.77.Final.jar:4.1.77.Final]
10.07 03:46:20 [Server] INFO at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.77.Final.jar:4.1.77.Final]
10.07 03:46:20 [Server] INFO at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.77.Final.jar:4.1.77.Final]
10.07 03:46:20 [Server] INFO at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:391) ~[netty-transport-classes-epoll-4.1.76.Final.jar:4.1.76.Final]
10.07 03:46:20 [Server] INFO at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995) ~[netty-common-4.1.77.Final.jar:4.1.77.Final]
10.07 03:46:20 [Server] INFO at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.77.Final.jar:4.1.77.Final]
10.07 03:46:20 [Server] INFO at java.lang.Thread.run(Thread.java:833) ~[?:?]
10.07 03:46:20 [Server] WARN at BetterPortals-0.12.0.jar//com.lauriethefish.betterportals.bukkit.player.view.entity.PlayerEntityView.update(PlayerEntityView.java:42)
10.07 03:46:20 [Server] WARN at BetterPortals-0.12.0.jar//com.lauriethefish.betterportals.bukkit.player.view.PlayerPortalView.update(PlayerPortalView.java:68)
10.07 03:46:20 [Server] WARN at BetterPortals-0.12.0.jar//com.lauriethefish.betterportals.bukkit.player.PlayerData.updatePortalViews(PlayerData.java:79)
10.07 03:46:20 [Server] WARN at BetterPortals-0.12.0.jar//com.lauriethefish.betterportals.bukkit.player.PlayerData.onUpdate(PlayerData.java:111)
10.07 03:46:20 [Server] WARN at java.base/java.util.HashMap$Values.forEach(HashMap.java:1065)
10.07 03:46:20 [Server] WARN at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1092)
10.07 03:46:20 [Server] WARN at BetterPortals-0.12.0.jar//com.lauriethefish.betterportals.bukkit.tasks.MainUpdate.run(MainUpdate.java:47)
10.07 03:46:20 [Server] WARN at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101)
10.07 03:46:20 [Server] WARN at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483)
10.07 03:46:20 [Server] WARN at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1490)
10.07 03:46:20 [Server] WARN at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:446)
10.07 03:46:20 [Server] WARN at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1414)
10.07 03:46:20 [Server] WARN at net.minecraft.server.MinecraftServer.v(MinecraftServer.java:1187)
10.07 03:46:20 [Server] WARN at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:302)
10.07 03:46:20 [Server] WARN at java.base/java.lang.Thread.run(Thread.java:833)
10.07 03:46:20 [Server] INFO Attempting to shut down the plugin . . .
10.07 03:46:20 [Server] INFO Disabling BetterPortals v0.12.0```
Lauriethefish commented 2 years ago

Could you give your server version? e.g. spigot, bukkit, paper, and what build you are using ideally?

Lauriethefish commented 2 years ago

Pretty sure I know the cause, fixing now.

Lauriethefish commented 2 years ago

If you could download the artifact here once it builds and test it, that would be great. Alternatively, a direct link to the build is here.

tensiyoka commented 2 years ago

testing it now. Ill let you know.

Also its paper, 1.19 build #58

On Sun, Jul 10, 2022 at 1:53 AM Lauriethefish @.***> wrote:

If you could download the artifact here https://github.com/Lauriethefish/BetterPortals/actions/runs/2643595290 once it builds and test it, that would be great.

— Reply to this email directly, view it on GitHub https://github.com/Lauriethefish/BetterPortals/issues/152#issuecomment-1179662052, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ7WCVKOKAXAS6RBCJAXZXLVTJQM5ANCNFSM53ELICDA . You are receiving this because you authored the thread.Message ID: @.***>

tensiyoka commented 2 years ago

Yep. Works thank you you’re a life saver. I used that plug-in to create a non-Euclidean geometry dungeon for my server. And it’s been a huge hit With everyone. :). Thanks soo soo much

Sent from my iPhone

On Jul 10, 2022, at 1:53 AM, Lauriethefish @.***> wrote:

If you could download the artifact here once it builds and test it, that would be great.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.