Closed 1480c1 closed 2 years ago
hello, thx for sharing, i've fixed it on a patch some days ago, the latest version is 1.7.2 for 1.18.2
Do you have a link to the commit that fixes it, or is it a local patch? Is it https://github.com/JheffersonMarques/MorePeripherals/commit/ee89d0a9fe123fa0f422856524a55a09adf89104#diff-cc3fea7e5b82ba26bf7832678113bd34566077ce481684a57e9133641e98c2c3R40
I guess based on https://feed-the-beast.com/modpack/96_ftb_plexiglass_mountain/versions MorePeripherals_1.18.2-1.7.1.jar
, the fix is not yet in, I guess I will need to ping ftb's issue tracker
Opened an issue on FTB's side https://github.com/FTBTeam/FTB-Modpack-Issues/issues/1360
Unless 1.7.2 requires an updated mod else where, it seems attack() might be broken for servers
server log:
[19:15:01] [ComputerCraft-Coroutine-1/FATAL] [ne.mi.fm.lo.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/Minecraft for invalid dist DEDICATED_SERVER
[19:15:01] [ComputerCraft-Coroutine-1/ERROR] [computercraft/]: Error calling call on dan200.computercraft.core.apis.PeripheralAPI@7eb99db9
java.lang.RuntimeException: Attempted to load class net/minecraft/client/Minecraft for invalid dist DEDICATED_SERVER
at net.minecraftforge.fml.loading.RuntimeDistCleaner.processClassWithFlags(RuntimeDistCleaner.java:57) ~[fmlloader-1.18.2-40.1.76.jar%2317!/:1.0] {}
at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:88) ~[modlauncher-9.1.3.jar%235!/:?] {}
at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-9.1.3.jar%235!/:?] {}
at cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:50) ~[modlauncher-9.1.3.jar%235!/:?] {}
at cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:110) ~[securejarhandler-1.0.3.jar:?] {}
at cpw.mods.cl.ModuleClassLoader.lambda$findClass$16(ModuleClassLoader.java:216) ~[securejarhandler-1.0.3.jar:?] {}
at cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:226) ~[securejarhandler-1.0.3.jar:?] {}
at cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:216) ~[securejarhandler-1.0.3.jar:?] {}
at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:132) ~[securejarhandler-1.0.3.jar:?] {}
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:?] {}
at com.hakimen.peripherals.peripherals.GrinderPeripheral.attack(GrinderPeripheral.java:69) ~[MorePeripherals_1.18.2-1.7.2.jar%23190!/:1.4] {re:classloading,pl:epic_rei_lmao:B}
at com.hakimen.peripherals.peripherals.GrinderPeripheral$cc$attack8.apply(CC generated method) ~[?:?] {re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading}
at dan200.computercraft.core.apis.PeripheralAPI$PeripheralWrapper.call(PeripheralAPI.java:112) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at dan200.computercraft.core.apis.PeripheralAPI.call(PeripheralAPI.java:361) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at dan200.computercraft.core.apis.PeripheralAPI$cc$call61.apply(CC generated method) ~[?:?] {re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading}
at dan200.computercraft.core.lua.ResultInterpreterFunction.invoke(ResultInterpreterFunction.java:61) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at cc.tweaked.internal.cobalt.function.ResumableVarArgFunction.invoke(ResumableVarArgFunction.java:77) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at cc.tweaked.internal.cobalt.function.LuaInterpreter.execute(LuaInterpreter.java:491) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at cc.tweaked.internal.cobalt.function.LuaInterpretedFunction.invoke(LuaInterpretedFunction.java:149) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at cc.tweaked.internal.cobalt.OperationHelper.invoke(OperationHelper.java:486) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at cc.tweaked.internal.cobalt.OperationHelper.invoke(OperationHelper.java:481) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at cc.tweaked.internal.cobalt.lib.BaseLib.pcall(BaseLib.java:436) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at cc.tweaked.internal.cobalt.lib.BaseLib.access$500(BaseLib.java:59) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at cc.tweaked.internal.cobalt.lib.BaseLib$BaseLibR.invoke(BaseLib.java:334) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at cc.tweaked.internal.cobalt.function.ResumableVarArgFunction.invoke(ResumableVarArgFunction.java:77) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at cc.tweaked.internal.cobalt.OperationHelper.invoke(OperationHelper.java:486) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at cc.tweaked.internal.cobalt.function.LuaInterpreter.execute(LuaInterpreter.java:403) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at cc.tweaked.internal.cobalt.function.LuaInterpretedFunction.resume(LuaInterpretedFunction.java:196) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at cc.tweaked.internal.cobalt.debug.DebugFrame.resume(DebugFrame.java:243) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at cc.tweaked.internal.cobalt.LuaThread.loop(LuaThread.java:566) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at cc.tweaked.internal.cobalt.LuaThread$1.run(LuaThread.java:463) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at dan200.computercraft.core.lua.CobaltLuaMachine.lambda$new$1(CobaltLuaMachine.java:82) ~[cc-tweaked-1.18.2-1.100.9.jar%2372!/:1.100.9] {re:classloading,pl:epic_rei_lmao:B}
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?] {}
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?] {}
at java.lang.Thread.run(Unknown Source) [?:?] {}
I checked cc: tweaked and it seem cc-tweaked-1.18.2-1.100.9.jar
does match the latest available at https://www.curseforge.com/minecraft/mc-mods/cc-tweaked/files
I did check and hasSword()
and other functions work fine, and attack()
worked fine in 1.7.1
I also did restart the server, but stilll had same issue
hmm, seems like the fakeplayer that is instancied is some how tied to a client instance
need to investigate it further
Perhaps this might be of interest:
Calling attack() without any mobs nearby (including myself) throws no error, but having an entity nearby does. Based on my nonexistent knowledge of java, that probably implies that the error is being thrown somewhere around https://github.com/JheffersonMarques/MorePeripherals/blob/a7cb4fa754cd854b976fda4ba7e3ff36f9be2091/src/main/java/com/hakimen/peripherals/peripherals/GrinderPeripheral.java#L57-L67 rather than when it's being instantiated or something.
Perhaps this might be of interest:
Calling attack() without any mobs nearby (including myself) throws no error, but having an entity nearby does. Based on my nonexistent knowledge of java, that probably implies that the error is being thrown somewhere around
can you check if it works when it's without a sword ?
can you check if it works when it's without a sword ?
Does not work, sword or no sword, same behavior
i have a feeling that its the usage of the fakeplayer that breaks that
a possible fix would be removing the fakeplayer entirely and appling the damage directly, tho enchanted swords would have no difference
I tested create's deployer, and it seems to attack properly, so I think there might be some merit in peeking at their code, licenses permitting.
The main reason I didn't use the deployer was because trying to extract the items from it without extracting the sword seems to be impossible without some other stuff, and I wanted to try cc.
i can't try it now, but tomorrow morning i'm gonna try to fix it
thx for all the help so far :D
Thanks for being responsive
so, i found out what was breaking it
i've put this on the attack() to see test the sword desapearing and forgot to remove it .-.
With the issue fixed, i've rebuild the mod, and put on curseforge, its the 1.7.3 version for 1.18.2, so i'm going to mark this as resolved and close the issue
thanks for the cooperation :D
Ah, so that's where that message was appearing from. I didn't see it in the repo so I thought it was from somewhere else while I was in creative
Thanks for the fix
Tested 1.7.3 and can confirm it works 🥳
Reproduction steps:
Reproduction video:
https://user-images.githubusercontent.com/8345542/193141674-1e242c50-a649-4afd-ab9a-0afdfa3c267c.mp4