[1.18.2] 跨世界传送末影龙时崩溃: EnderDragon cannot be cast to EnderDragonPart
NattoCB opened this issue · 1 comments
NattoCB commented
运行环境
Minecraft版本(1.12.2/1.16.5/1.18.2): 1.18.2
构建版本(从/version指令获取): ecf29bc
相关模组/插件: 代码如下
一个简易 spigot Event 处理:
PlayerInteractAtEntityEvent e 从 EventHandler 接到事件
Entity entity = e.getRightClicked();
entity.teleport(loc);
描述这个BUG
当 entity 是末影龙,且世界不是 DIM1 end 时:
java.lang.ClassCastException: class net.minecraft.world.entity.boss.enderdragon.EnderDragon cannot be cast to class net.minecraft.world.entity.boss.EnderDragonPart (net.minecraft.world.entity.boss.enderdragon.EnderDragon and net.minecraft.world.entity.boss.EnderDragonPart are in module minecraft@1.18.2 of loader 'TRANSFORMER' @21ae657b)
at org.bukkit.craftbukkit.v1_18_R2.entity.CraftEnderDragonPart.getHandle(CraftEnderDragonPart.java:20) ~[forge-1.18.2-40.2.14-universal.jar%23138!/:?] {re:classloading}
at org.bukkit.craftbukkit.v1_18_R2.entity.CraftEnderDragonPart.getHandle(CraftEnderDragonPart.java:8) ~[forge-1.18.2-40.2.14-universal.jar%23138!/:?] {re:classloading}
at org.bukkit.craftbukkit.v1_18_R2.entity.CraftEntity.getUniqueId(CraftEntity.java:754) ~[forge-1.18.2-40.2.14-universal.jar%23138!/:?] {re:mixin,re:classloading}
at org.bukkit.craftbukkit.v1_18_R2.entity.CraftPlayer.canSee(CraftPlayer.java:1266) ~[forge-1.18.2-40.2.14-universal.jar%23138!/:?] {re:classloading}
at net.minecraft.server.level.ChunkMap$TrackedEntity.m_140497_(ChunkMap.java:1337) ~[server-1.18.2-20220404.173914-srg.jar%23133!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:ars_nouveau.mixins.json:camera.TrackedEntityMixin,pl:mixin:APP:railways-common.mixins.json:conductor_possession.TrackedEntityMixin,pl:mixin:A}
at net.minecraft.server.level.ChunkMap$TrackedEntity.m_140487_(ChunkMap.java:1371) ~[server-1.18.2-20220404.173914-srg.jar%23133!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:ars_nouveau.mixins.json:camera.TrackedEntityMixin,pl:mixin:APP:railways-common.mixins.json:conductor_possession.TrackedEntityMixin,pl:mixin:A}
at net.minecraft.server.level.ChunkMap.m_140421_(ChunkMap.java:1182) ~[server-1.18.2-20220404.173914-srg.jar%23133!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:ars_nouveau.mixins.json:camera.ChunkMapMixin,pl:mixin:APP:railways-common.mixins.json:conductor_possession.ChunkMapMixin,pl:mixin:A}
at net.minecraft.server.level.ServerChunkCache.m_8490_(ServerChunkCache.java:427) ~[server-1.18.2-20220404.173914-srg.jar%23133!/:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}
at net.minecraft.server.level.ServerChunkCache.m_201698_(ServerChunkCache.java:356) ~[server-1.18.2-20220404.173914-srg.jar%23133!/:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}
at net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:396) ~[server-1.18.2-20220404.173914-srg.jar%23133!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:observable.common.json:ServerLevelMixin,pl:mixin:APP:create.mixins.json:accessor.ServerLevelAccessor,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:1229) ~[server-1.18.2-20220404.173914-srg.jar%23133!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:A}
at net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:397) ~[server-1.18.2-20220404.173914-srg.jar%23133!/:?] {re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:1144) ~[server-1.18.2-20220404.173914-srg.jar%23133!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:984) ~[server-1.18.2-20220404.173914-srg.jar%23133!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:344) ~[server-1.18.2-20220404.173914-srg.jar%23133!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:A}
at java.lang.Thread.run(Thread.java:833) [?:?] {re:mixin}
导致的问题
服务器崩溃,CraftPlayer.canSee 方法异常
Kotori0629 commented
未复现