APDevTeam / Movecraft-Combat

Movecraft Combat Addon
GNU General Public License v3.0
7 stars 17 forks source link

1.20.4 BlastResistance override doesn't work as expected #120

Closed Intybyte closed 7 months ago

Intybyte commented 8 months ago

This warning gets pasted for each element in DurabilityOverride in config.yml

[19:48:09 WARN]: java.lang.IllegalAccessException: Can not set static final [Lnet.minecraft.core.EnumDirection; field net.minecraft.world.level.block.state.BlockBase.aF to java.lang.Float
[19:48:09 WARN]:        at java.base/jdk.internal.reflect.UnsafeFieldAccessorImpl.throwFinalFieldIllegalAccessException(UnsafeFieldAccessorImpl.java:76)
[19:48:09 WARN]:        at java.base/jdk.internal.reflect.UnsafeFieldAccessorImpl.throwFinalFieldIllegalAccessException(UnsafeFieldAccessorImpl.java:80)
[19:48:09 WARN]:        at java.base/jdk.internal.reflect.UnsafeQualifiedStaticObjectFieldAccessorImpl.set(UnsafeQualifiedStaticObjectFieldAccessorImpl.java:77)
[19:48:09 WARN]:        at java.base/java.lang.reflect.Field.set(Field.java:799)
[19:48:09 WARN]:        at org.apache.commons.lang.reflect.FieldUtils.writeField(FieldUtils.java:523)
[19:48:09 WARN]:        at org.apache.commons.lang.reflect.FieldUtils.writeField(FieldUtils.java:500)
[19:48:09 WARN]:        at Movecraft-Combat_fcdda5b521cd26de566946383af083e48c113191.jar//net.countercraft.movecraft.combat.features.BlastResistanceOverride$BlastResistanceNMS.writeField(BlastResistanceOverride.java:105)
[19:48:09 WARN]:        at Movecraft-Combat_fcdda5b521cd26de566946383af083e48c113191.jar//net.countercraft.movecraft.combat.features.BlastResistanceOverride$BlastResistanceNMS_v1_20.setBlastResistance(BlastResistanceOverride.java:143)
[19:48:09 WARN]:        at Movecraft-Combat_fcdda5b521cd26de566946383af083e48c113191.jar//net.countercraft.movecraft.combat.features.BlastResistanceOverride.setBlastResistance(BlastResistanceOverride.java:63)
[19:48:09 WARN]:        at Movecraft-Combat_fcdda5b521cd26de566946383af083e48c113191.jar//net.countercraft.movecraft.combat.features.BlastResistanceOverride.enable(BlastResistanceOverride.java:72)
[19:48:09 WARN]:        at Movecraft-Combat_fcdda5b521cd26de566946383af083e48c113191.jar//net.countercraft.movecraft.combat.MovecraftCombat.onEnable(MovecraftCombat.java:143)
[19:48:09 WARN]:        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:287)
[19:48:09 WARN]:        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:188)
[19:48:09 WARN]:        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[19:48:09 WARN]:        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[19:48:09 WARN]:        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[19:48:09 WARN]:        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[19:48:09 WARN]:        at PlugManX.jar//com.rylinaux.plugman.util.PaperPluginUtil.load(PaperPluginUtil.java:421)
[19:48:09 WARN]:        at PlugManX.jar//com.rylinaux.plugman.util.PaperPluginUtil.load(PaperPluginUtil.java:374)
[19:48:09 WARN]:        at PlugManX.jar//com.rylinaux.plugman.util.PaperPluginUtil.reload(PaperPluginUtil.java:526)
[19:48:09 WARN]:        at PlugManX.jar//com.rylinaux.plugman.command.ReloadCommand.execute(ReloadCommand.java:125)
[19:48:09 WARN]:        at PlugManX.jar//com.rylinaux.plugman.PlugManCommandHandler.onCommand(PlugManCommandHandler.java:97)
[19:48:09 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[19:48:09 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168)
[19:48:09 WARN]:        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchCommand(CraftServer.java:1013)
[19:48:09 WARN]:        at org.bukkit.craftbukkit.v1_20_R3.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64)
[19:48:09 WARN]:        at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73)
[19:48:09 WARN]:        at net.minecraft.commands.execution.tasks.ExecuteCommand.a(ExecuteCommand.java:32)
[19:48:09 WARN]:        at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:13)
[19:48:09 WARN]:        at net.minecraft.commands.execution.UnboundEntryAction.a(UnboundEntryAction.java:8)
[19:48:09 WARN]:        at net.minecraft.commands.execution.CommandQueueEntry.a(CommandQueueEntry.java:5)
[19:48:09 WARN]:        at net.minecraft.commands.execution.ExecutionContext.a(ExecutionContext.java:101)
[19:48:09 WARN]:        at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:442)
[19:48:09 WARN]:        at net.minecraft.commands.CommandDispatcher.performCommand(CommandDispatcher.java:344)
[19:48:09 WARN]:        at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:331)
[19:48:09 WARN]:        at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2301)
[19:48:09 WARN]:        at net.minecraft.server.network.PlayerConnection.lambda$handleChatCommand$15(PlayerConnection.java:2261)
[19:48:09 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.b(IAsyncTaskHandler.java:59)
[19:48:09 WARN]:        at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[19:48:09 WARN]:        at net.minecraft.server.TickTask.run(TickTask.java:18)
[19:48:09 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.d(IAsyncTaskHandler.java:153)
[19:48:09 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(IAsyncTaskHandlerReentrant.java:24)
[19:48:09 WARN]:        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1488)
[19:48:09 WARN]:        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194)
[19:48:09 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.x(IAsyncTaskHandler.java:126)
[19:48:09 WARN]:        at net.minecraft.server.MinecraftServer.bl(MinecraftServer.java:1465)
[19:48:09 WARN]:        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1388)
[19:48:09 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.c(IAsyncTaskHandler.java:136)
[19:48:09 WARN]:        at net.minecraft.server.MinecraftServer.w_(MinecraftServer.java:1366)
[19:48:09 WARN]:        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1255)
[19:48:09 WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323)
[19:48:09 WARN]:        at java.base/java.lang.Thread.run(Thread.java:840)
[19:48:09 WARN]: [Movecraft-Combat] Unable to set BROWN_STAINED_GLASS_PANE: 6.0
Intybyte commented 8 months ago

A good fix for this for now is going into BlastResistanceOverride.java, line 56 and edit "BlastResistanceNMS_v1_20" to "BlastResistanceNMS_V2", as the deobfuscated field for NMS in 1.20.4 is now "aH" again instead of the 1.20,1 "aF"

TylerS1066 commented 7 months ago

Why Mojang why...

We'll work on it.