Skip to content
This repository has been archived by the owner on Jul 29, 2021. It is now read-only.

CatServer compatibility #179

Closed
weihao opened this issue Dec 31, 2019 · 10 comments
Closed

CatServer compatibility #179

weihao opened this issue Dec 31, 2019 · 10 comments
Assignees
Labels
bug A failure in the project that causes it to produce an incorrect or unexpected result. compatibility Compatible issues with other versions, platforms, and plugins. critical An error that has a disastrous impact on the server that needs immediate attention. help wanted The maintainer is needing some help!

Comments

@weihao
Copy link
Owner

weihao commented Dec 31, 2019

[21:26:35] [Server thread/INFO]: Fearr issued server command: /enhance menu
[21:26:37] [Server thread/ERROR]: Could not pass event InventoryClickEvent to EnchantmentsEnhance v7.9.3
org.bukkit.event.EventException: null
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:69) ~[EventExecutor$2.class:git-CatServerAsync-1.12.2-e23e25a]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[RegisteredListener.class:git-CatServerAsync-1.12.2-e23e25a]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:504) [SimplePluginManager.class:git-CatServerAsync-1.12.2-e23e25a]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:489) [SimplePluginManager.class:git-CatServerAsync-1.12.2-e23e25a]
at net.minecraft.network.NetHandlerPlayServer.func_147351_a(NetHandlerPlayServer.java:2113) [pa.class:?]
at net.minecraft.network.play.client.CPacketClickWindow.func_148833_a(CPacketClickWindow.java:38) [lf.class:?]
at net.minecraft.network.play.client.CPacketClickWindow.func_148833_a(CPacketClickWindow.java:12) [lf.class:?]
at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [hv$1.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222]
at net.minecraft.util.Util.func_181617_a(Util.java:50) [h.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:842) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:473) [nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:779) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:633) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
Caused by: java.util.NoSuchElementException: List is empty.
at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:196) ~[?:?]
at com.lgou2w.ldk.reflect.FuzzyReflectMatcher.result(FuzzyReflectMatcher.kt:176) ~[?:?]
at com.lgou2w.ldk.reflect.FuzzyReflectFieldMatcher.resultAccessorAs(FuzzyReflectFieldMatcher.kt:128) ~[?:?]
at com.lgou2w.ldk.reflect.FuzzyReflectFieldMatcher.resultAccessor(FuzzyReflectFieldMatcher.kt:115) ~[?:?]
at com.lgou2w.ldk.bukkit.item.ItemFactory$FIELD_ITEMSTACK_TAG$2.invoke(ItemFactory.kt:65) ~[?:?]
at com.lgou2w.ldk.bukkit.item.ItemFactory$FIELD_ITEMSTACK_TAG$2.invoke(ItemFactory.kt:47) ~[?:?]
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) ~[?:?]
at com.lgou2w.ldk.bukkit.item.ItemFactory.getFIELD_ITEMSTACK_TAG(ItemFactory.kt) ~[?:?]
at com.lgou2w.ldk.bukkit.item.ItemFactory.readTag(ItemFactory.kt:200) ~[?:?]
at com.lgou2w.ldk.bukkit.item.ItemFactory.readTagSafe(ItemFactory.kt:178) ~[?:?]
at org.pixeltime.enchantmentsenhance.manager.ItemManager.getItemEnchantLevel(ItemManager.java:90) ~[?:?]
at org.pixeltime.enchantmentsenhance.event.Enhance.getValidationOfItem(Enhance.java:83) ~[?:?]
at org.pixeltime.enchantmentsenhance.gui.menu.handlers.MenuHandler.onClick(MenuHandler.java:38) ~[?:?]
at catserver.server.executor.asm.generated.GeneratedEventExecutor25.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:67) ~[EventExecutor$2.class:git-CatServerAsync-1.12.2-e23e25a]
... 15 more

@weihao weihao added bug A failure in the project that causes it to produce an incorrect or unexpected result. critical An error that has a disastrous impact on the server that needs immediate attention. compatibility Compatible issues with other versions, platforms, and plugins. labels Dec 31, 2019
@hachimenHato
Copy link

手持剑时右键附魔台后台报错:
[11:22:37] [Server thread/ERROR]: Could not pass event PlayerInteractEvent to EnchantmentsEnhance v7.9.2
org.bukkit.event.EventException: null
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:69) ~[EventExecutor$2.class:git-CatServer-1.12.2-6889a5f]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[RegisteredListener.class:git-CatServer-1.12.2-6889a5f]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500) [SimplePluginManager.class:git-CatServer-1.12.2-6889a5f]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485) [SimplePluginManager.class:git-CatServer-1.12.2-6889a5f]
at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:274) [CraftEventFactory.class:git-CatServer-1.12.2-6889a5f]
at net.minecraft.server.management.PlayerInteractionManager.func_187251_a(PlayerInteractionManager.java:492) [or.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_184337_a(NetHandlerPlayServer.java:1128) [pa.class:?]
at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.func_148833_a(SourceFile:55) [ma.class:?]
at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.func_148833_a(SourceFile:11) [ma.class:?]
at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [hv$1.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_221]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_221]
at net.minecraft.util.Util.func_181617_a(Util.java:50) [h.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:841) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:472) [nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:778) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:632) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_221]
Caused by: java.util.NoSuchElementException: List is empty.
at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:196) ~[?:?]
at com.lgou2w.ldk.reflect.FuzzyReflectMatcher.result(FuzzyReflectMatcher.kt:176) ~[?:?]
at com.lgou2w.ldk.reflect.FuzzyReflectFieldMatcher.resultAccessorAs(FuzzyReflectFieldMatcher.kt:128) ~[?:?]
at com.lgou2w.ldk.reflect.FuzzyReflectFieldMatcher.resultAccessor(FuzzyReflectFieldMatcher.kt:115) ~[?:?]
at com.lgou2w.ldk.bukkit.item.ItemFactory$FIELD_ITEMSTACK_TAG$2.invoke(ItemFactory.kt:65) ~[?:?]
at com.lgou2w.ldk.bukkit.item.ItemFactory$FIELD_ITEMSTACK_TAG$2.invoke(ItemFactory.kt:47) ~[?:?]
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) ~[?:?]
at com.lgou2w.ldk.bukkit.item.ItemFactory.getFIELD_ITEMSTACK_TAG(ItemFactory.kt) ~[?:?]
at com.lgou2w.ldk.bukkit.item.ItemFactory.readTag(ItemFactory.kt:200) ~[?:?]
at com.lgou2w.ldk.bukkit.item.ItemFactory.readTagSafe(ItemFactory.kt:178) ~[?:?]
at org.pixeltime.enchantmentsenhance.manager.ItemManager.getGive(ItemManager.java:137) ~[?:?]
at org.pixeltime.enchantmentsenhance.listener.ItemUseListener.onItemClick(ItemUseListener.java:38) ~[?:?]
at catserver.server.executor.asm.generated.GeneratedEventExecutor984.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:67) ~[EventExecutor$2.class:git-CatServer-1.12.2-6889a5f]
... 17 more

打开附魔GUI将剑放入时的报错,剑无法放入:

[11:23:56] [Server thread/ERROR]: Could not pass event InventoryClickEvent to EnchantmentsEnhance v7.9.2
org.bukkit.event.EventException: null
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:69) ~[EventExecutor$2.class:git-CatServer-1.12.2-6889a5f]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[RegisteredListener.class:git-CatServer-1.12.2-6889a5f]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500) [SimplePluginManager.class:git-CatServer-1.12.2-6889a5f]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485) [SimplePluginManager.class:git-CatServer-1.12.2-6889a5f]
at net.minecraft.network.NetHandlerPlayServer.func_147351_a(NetHandlerPlayServer.java:2113) [pa.class:?]
at net.minecraft.network.play.client.CPacketClickWindow.func_148833_a(CPacketClickWindow.java:38) [lf.class:?]
at net.minecraft.network.play.client.CPacketClickWindow.func_148833_a(CPacketClickWindow.java:12) [lf.class:?]
at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [hv$1.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_221]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_221]
at net.minecraft.util.Util.func_181617_a(Util.java:50) [h.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:841) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:472) [nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:778) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:632) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_221]
Caused by: java.util.NoSuchElementException: List is empty.
at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:196) ~[?:?]
at com.lgou2w.ldk.reflect.FuzzyReflectMatcher.result(FuzzyReflectMatcher.kt:176) ~[?:?]
at com.lgou2w.ldk.reflect.FuzzyReflectFieldMatcher.resultAccessorAs(FuzzyReflectFieldMatcher.kt:128) ~[?:?]
at com.lgou2w.ldk.reflect.FuzzyReflectFieldMatcher.resultAccessor(FuzzyReflectFieldMatcher.kt:115) ~[?:?]
at com.lgou2w.ldk.bukkit.item.ItemFactory$FIELD_ITEMSTACK_TAG$2.invoke(ItemFactory.kt:65) ~[?:?]
at com.lgou2w.ldk.bukkit.item.ItemFactory$FIELD_ITEMSTACK_TAG$2.invoke(ItemFactory.kt:47) ~[?:?]
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) ~[?:?]
at com.lgou2w.ldk.bukkit.item.ItemFactory.getFIELD_ITEMSTACK_TAG(ItemFactory.kt) ~[?:?]
at com.lgou2w.ldk.bukkit.item.ItemFactory.readTag(ItemFactory.kt:200) ~[?:?]
at com.lgou2w.ldk.bukkit.item.ItemFactory.readTagSafe(ItemFactory.kt:178) ~[?:?]
at org.pixeltime.enchantmentsenhance.manager.ItemManager.getItemEnchantLevel(ItemManager.java:86) ~[?:?]
at org.pixeltime.enchantmentsenhance.event.Enhance.getValidationOfItem(Enhance.java:83) ~[?:?]
at org.pixeltime.enchantmentsenhance.gui.menu.handlers.MenuHandler.onClick(MenuHandler.java:38) ~[?:?]
at catserver.server.executor.asm.generated.GeneratedEventExecutor982.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:67) ~[EventExecutor$2.class:git-CatServer-1.12.2-6889a5f]
... 15 more

空手右键附魔台或者使用指令打开GUI以及尝试放入非武器物品时不会报错(当然也放不进去)

@lgou2w
Copy link
Collaborator

lgou2w commented Dec 31, 2019

LDK 目前不兼容魔改版的服务端 😢

图片

@hachimenHato
Copy link

有办法解决吗QAQ

@lgou2w
Copy link
Collaborator

lgou2w commented Dec 31, 2019

LDK 目前没办法,因为 CatServer 这个服务端的 patcher 补丁修改了很多 NMS 内容。看 @25 吧,如果他想有兼容 CatServer 的打算的话,我看看怎么解决。目前真的没办法。。。

@weihao
Copy link
Owner Author

weihao commented Dec 31, 2019

看到这个报错我还以为是和#178 一样的问题。

Caused by: java.util.NoSuchElementException: List is empty.
at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:196) ~[?:?]

如果是NMS被魔改那么并不推荐兼容。

@lgou2w
Copy link
Collaborator

lgou2w commented Dec 31, 2019

是的,这个异常有点迷惑性,其实是 FuzzyReflect 模糊反射的问题。比如这个问题其实是 ItemFactory$FIELD_ITEMSTACK_TAG 找不到 NMS 的 ItemStack.tag 字段。

@lgou2w
Copy link
Collaborator

lgou2w commented Dec 31, 2019

等一下我给你反编译一下 CatServer 服务端的这个字段属性,我找一下服务端文件。

@weihao
Copy link
Owner Author

weihao commented Dec 31, 2019

等一下我给你反编译一下 CatServer 服务端的这个字段属性,我找一下服务端文件。

辛苦了!我正在尝试debug #178

@lgou2w
Copy link
Collaborator

lgou2w commented Dec 31, 2019

是的,它没有 net.minecraft.server.版本号 这个包的,并且 NMS 的内容都是被补丁修改过的。

图片

@weihao
Copy link
Owner Author

weihao commented Dec 31, 2019

是的,它没有 net.minecraft.server.版本号 这个包的,并且 NMS 的内容都是被补丁修改过的。

图片

原来如此

@weihao weihao added the help wanted The maintainer is needing some help! label Jan 4, 2020
@weihao weihao closed this as completed Jan 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug A failure in the project that causes it to produce an incorrect or unexpected result. compatibility Compatible issues with other versions, platforms, and plugins. critical An error that has a disastrous impact on the server that needs immediate attention. help wanted The maintainer is needing some help!
Projects
None yet
Development

No branches or pull requests

3 participants