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

`final` UUID field issue #143

Closed Shidapu closed 2 years ago

Shidapu commented 2 years ago

[12:34:47 ERROR]: [BetterPortals] Please create an issue at https://github.com/Lauriethefish/BetterPortals/issues to get this fixed.
[12:34:47 WARN]: java.lang.RuntimeException: Cannot set field private final java.util.UUID net.minecraft.network.protocol.game.PacketPlayOutNamedEntitySpawn.b to value a7c4c154-5152-4e07-b5ec-12268fe2e153
[12:34:47 WARN]:        at ProtocolLib.jar//com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor.set(DefaultFieldAccessor.java:46)
[12:34:47 WARN]:        at ProtocolLib.jar//com.comphenix.protocol.reflect.FieldUtils.writeField(FieldUtils.java:439)
[12:34:47 WARN]:        at ProtocolLib.jar//com.comphenix.protocol.reflect.StructureModifier.writeInternal(StructureModifier.java:377)
[12:34:47 WARN]:        at ProtocolLib.jar//com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:347)
[12:34:47 WARN]:        at BetterPortals-0.11.1.jar//com.lauriethefish.betterportals.bukkit.entity.faking.EntityPacketManipulator.showEntity(EntityPacketManipulator.java:44)
[12:34:47 WARN]:        at BetterPortals-0.11.1.jar//com.lauriethefish.betterportals.bukkit.entity.faking.IEntityPacketManipulator.showEntity(IEntityPacketManipulator.java:28)
[12:34:47 WARN]:        at BetterPortals-0.11.1.jar//com.lauriethefish.betterportals.bukkit.player.view.entity.PlayerEntityView.lambda$onDeactivate$2(PlayerEntityView.java:114)
[12:34:47 WARN]:        at java.base/java.util.HashMap.forEach(HashMap.java:1421)
[12:34:47 WARN]:        at BetterPortals-0.11.1.jar//com.lauriethefish.betterportals.bukkit.player.view.entity.PlayerEntityView.onDeactivate(PlayerEntityView.java:114)
[12:34:47 WARN]:        at BetterPortals-0.11.1.jar//com.lauriethefish.betterportals.bukkit.player.view.PlayerPortalView.onDeactivate(PlayerPortalView.java:81)
[12:34:47 WARN]:        at BetterPortals-0.11.1.jar//com.lauriethefish.betterportals.bukkit.player.PlayerData.setNotViewing(PlayerData.java:168)
[12:34:47 WARN]:        at BetterPortals-0.11.1.jar//com.lauriethefish.betterportals.bukkit.player.PlayerData.updatePortalViews(PlayerData.java:72)
[12:34:47 WARN]:        at BetterPortals-0.11.1.jar//com.lauriethefish.betterportals.bukkit.player.PlayerData.onUpdate(PlayerData.java:111)
[12:34:47 WARN]:        at java.base/java.util.HashMap$Values.forEach(HashMap.java:1065)
[12:34:47 WARN]:        at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1092)
[12:34:47 WARN]:        at BetterPortals-0.11.1.jar//com.lauriethefish.betterportals.bukkit.tasks.MainUpdate.run(MainUpdate.java:47)
[12:34:47 WARN]:        at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101)
[12:34:47 WARN]:        at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483)
[12:34:47 WARN]:        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1532)
[12:34:47 WARN]:        at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:483)
[12:34:47 WARN]:        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1456)
[12:34:47 WARN]:        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1226)
[12:34:47 WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316)
[12:34:47 WARN]:        at java.base/java.lang.Thread.run(Thread.java:833)
[12:34:47 WARN]: Caused by: java.lang.ClassCastException: Cannot cast net.minecraft.network.protocol.game.PacketPlayOutSpawnEntityLiving to net.minecraft.network.protocol.game.PacketPlayOutNamedEntitySpawn
[12:34:47 WARN]:        at java.base/java.lang.Class.cast(Class.java:3889)
[12:34:47 WARN]:        at ProtocolLib.jar//com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor.set(DefaultFieldAccessor.java:43)
[12:34:47 WARN]:        ... 23 more
[12:34:47 INFO]: [BetterPortals] Attempting to shut down the plugin . . .
[12:34:47 INFO]: [BetterPortals] Disabling BetterPortals v0.11.1```
Lauriethefish commented 2 years ago

Could you please share what type of server you're using? And some steps to reproduce? This seems like an error within protocollib.

Lauriethefish commented 2 years ago

This seems to be an issue within ProtocolLib so I will close it for now. If you update ProtocolLib (to the latest dev build) and still have this issue, I will re-open it.