OldCombatMechanics

OldCombatMechanics

46.1k Downloads

Armor too strong (Mohist)

MoMo2935 opened this issue ยท 21 comments

commented

https://streamable.com/tgdkxl
For some reason when old-armour-strength is true, the armor is WAY too strong. Sharp 5 sword does nothing until they take off their chestplate. As shown in that video above.

Somehow you all managed to make Modded swords automatically have the instant attack speed? I'm not sure how you did that, but it works out of the box for me. I configured

    GOLD_SWORD: 5
    WOOD_SWORD: 5
    STONE_SWORD: 6
    IRON_SWORD: 7
    DIAMOND_SWORD: 8
    NETHERITE_SWORD: 9
    PIXELMON_MOON_STONE_SWORD: 8

but im honestly not sure if it does anything, because pixelmon weapons have 21.6 attack speed already when I installed the plugin? under Moon Stone Sword specifically, it shows 4 attack damage. but im not sure if it actually does that little because of the armor bug.

Also little request at the end of this. I've yet to find an anti-crafting plugin as good as this for the anti-shield crafting. I added a bunch of pixelmon blocks (Which worked?! :D) that I wanted to prevent crafting. Would you all consider making that a plugin in itself?

commented

Changing old-armour-strength to false makes it do SOME damage, but not as much as a sharp V sword should be doing. when they take their chestplate off, it does actual damage

commented

For some reason when old-armour-strength is true, the armor is WAY too strong. Sharp 5 sword does nothing until they take off their chestplate. As shown in that video above.

please enable debug mode in the config and try to reproduce this issue so we can see the actual numbers at play here. it's kinda hard to predict what could be going on since you're using Mohist and mods and just so many variables that are impossible to predict without more information.

Somehow you all managed to make Modded swords automatically have the instant attack speed?

under the hood, it's actually the player that's having its attributes modified, meaning that it doesn't matter what item you're holding (or no item at all): they'll all have the faster attack speed :)

it shows 4 attack damage

are you referring to the tooltip on the item? if so, that does not accurately represent the damage of the item, as OCM modifies the damage when the damage event actually happens, rather than modifying the item.

Would you all consider making that a plugin in itself?

most likely not, although perhaps if others request the same it can be concerned. in the meantime, I found this with a little google searching: https://www.spigotmc.org/resources/anticraft-1-7-1-14.41982/

gave it a try, and it works like a charm, lets you block or unblock items easily in-game via a command, and the only annoying thing is the message when you are blocked from crafting (which can be disabled). keep in mind, if you have AntiCraft.bypass.<item>, you will bypass the crafting restrictions for said item, which tripped me up at first as I forgot I was in op when testing this.


tl;dr enable debug mode in the config and please provide some screenshots of output while hitting a player with vs. without diamond armor

commented

2020-08-08_21 06 29
2020-08-08_21 06 53
First image is with chestplate (Still full HP)
Second is without it (2.5 hearts damage)

commented

The debug log shows the exact same thing happening, so how are you measuring the amount of damage done?

commented

well, when you see the video i posted above, their health is above their head. the sword does almost 0 when he has a chestplate on. when he takes it off, it does a TON

commented

If i hit him like 20~ times, it does half a heart. which is ridiculous. the second he removes his chestplate, it deals 2.5~ per hit.

commented

Let me know if I can do anything else to help you all figure this out.

commented
  1. Does this also happen without (a) any enchantments on the armour and/or (b) any enchantments on the sword?
  2. Does this also happen without jumping for critical hits?
  3. Does this also happen when taking off a different piece of the armour?
  4. Does this also happen with a different armour material (e.g. iron)?
commented
  1. Yes. a non enchanted sword does absolutely nothing to an armored opponent.
  2. yes. again, less damage.
  3. Yes, but to a lesser extent. it seems to do more, but not... THAT much more.
  4. not 100% sure, will test in a moment
commented

Yes. sharp 5 diamond does less than 1 heart to a fully unenchanted iron player.

commented

An unenchanted diamond sword hitting a player in full unenchanted iron armour should do 4.8 damage, i.e. two hearts. In 1.8 each armour point gives a 4% reduction of damage. The calculations for enchantments are more complicated than that. But already we can see there's something wrong. Under my testing, I get the correct damage reduction values, so I suspect either a plugin, a mod, or whatever you're using to run the server is somehow interfering.

To check if that is the case, I please ask you to make a copy of the server and try disabling the plugins/mods etc. to see if there is a change at all, to pinpoint where the issue is coming from.

commented
[10:55:02 ERROR]: Error occurred while enabling OldCombatMechanics v1.8.1 (Is it up to date?)
java.lang.NullPointerException: section cannot be null!
at java.util.Objects.requireNonNull(Objects.java:228) ~[?:1.8.0_262]
at kernitus.plugin.OldCombatMechanics.utilities.ConfigUtils.loadPotionDurationsList(ConfigUtils.java:64) ~[?:?]
at kernitus.plugin.OldCombatMechanics.module.ModuleOldPotionEffects.reload(ModuleOldPotionEffects.java:64) ~[?:?]
at kernitus.plugin.OldCombatMechanics.module.ModuleOldPotionEffects.<init>(ModuleOldPotionEffects.java:59) ~[?:?]
at kernitus.plugin.OldCombatMechanics.OCMMain.registerModules(OCMMain.java:160) ~[?:?]
at kernitus.plugin.OldCombatMechanics.OCMMain.onEnable(OCMMain.java:55) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:177) ~[JavaPlugin.class:1.12.2-dde44c8]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:318) [JavaPluginLoader.class:1.12.2-dde44c8]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:399) [SimplePluginManager.class:1.12.2-dde44c8]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:474) [CraftServer.class:1.12.2-dde44c8]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:415) [CraftServer.class:1.12.2-dde44c8]
at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:384) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:316) [nz.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_262]

No config change but getting an error now.

commented

That looks like there could be something wrong with the potions section of your config, did you change something there?

commented

Nope. Didnt touch it. I'll try to regen it

commented

Forgot to mention this, but i did regen it.

> [03:03:56 ERROR]: Could not pass event InventoryOpenEvent to OldCombatMechanics v1.8.1
java.lang.AbstractMethodError: null
at org.bukkit.craftbukkit.v1_12_R1.inventory.CraftInventory.getLocation(CraftInventory.java:523) ~[CraftInventory.class:1.12.2-dde44c8]
at kernitus.plugin.OldCombatMechanics.module.ModuleOldBrewingStand.onInventoryOpen(ModuleOldBrewingStand.java:57) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor229.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:61) ~[EventExecutor.class:1.12.2-dde44c8]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[TimedEventExecutor.class:1.12.2-dde44c8]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:66) ~[RegisteredListener.class:1.12.2-dde44c8]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:484) ~[SimplePluginManager.class:1.12.2-dde44c8]
at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callInventoryOpenEvent(CraftEventFactory.java:907) ~[CraftEventFactory.class:1.12.2-dde44c8]
at net.minecraft.entity.player.EntityPlayerMP.func_71007_a(EntityPlayerMP.java:1085) ~[oq.class:?]
at pt.licious.shulkerbags.Listener.displayGUI(Listener.java:65) ~[Listener.class:?]
at pt.licious.shulkerbags.Listener.onPlayerInteract(Listener.java:42) ~[Listener.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_122_Listener_onPlayerInteract_RightClickItem.invoke(.dynamic) ~[?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:96) ~[ASMEventHandler.class:1.12.2-dde44c8]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:186) ~[EventBus.class:1.12.2-dde44c8]
at net.minecraftforge.common.ForgeHooks.onItemRightClick(ForgeHooks.java:906) ~[ForgeHooks.class:1.12.2-dde44c8]
at net.minecraft.server.management.PlayerInteractionManager.func_187250_a(PlayerInteractionManager.java:435) ~[or.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_147346_a(NetHandlerPlayServer.java:1209) ~[pa.class:?]
at net.minecraft.network.play.client.CPacketPlayerTryUseItem.func_148833_a(CPacketPlayerTryUseItem.java:36) ~[mb.class:?]
at net.minecraft.network.play.client.CPacketPlayerTryUseItem.func_148833_a(CPacketPlayerTryUseItem.java:9) ~[mb.class:?]
at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:16) ~[hv.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_262]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_262]
at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:839) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:466) [nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:778) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:624) [MinecraftServer.class:?]

I regenned it, still got that error. problem persists.

commented

Forgot to mention this, but i did regen it.

> [03:03:56 ERROR]: Could not pass event InventoryOpenEvent to OldCombatMechanics v1.8.1
java.lang.AbstractMethodError: null
at org.bukkit.craftbukkit.v1_12_R1.inventory.CraftInventory.getLocation(CraftInventory.java:523) ~[CraftInventory.class:1.12.2-dde44c8]
at kernitus.plugin.OldCombatMechanics.module.ModuleOldBrewingStand.onInventoryOpen(ModuleOldBrewingStand.java:57) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor229.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:61) ~[EventExecutor.class:1.12.2-dde44c8]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[TimedEventExecutor.class:1.12.2-dde44c8]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:66) ~[RegisteredListener.class:1.12.2-dde44c8]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:484) ~[SimplePluginManager.class:1.12.2-dde44c8]
at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callInventoryOpenEvent(CraftEventFactory.java:907) ~[CraftEventFactory.class:1.12.2-dde44c8]
at net.minecraft.entity.player.EntityPlayerMP.func_71007_a(EntityPlayerMP.java:1085) ~[oq.class:?]
at pt.licious.shulkerbags.Listener.displayGUI(Listener.java:65) ~[Listener.class:?]
at pt.licious.shulkerbags.Listener.onPlayerInteract(Listener.java:42) ~[Listener.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_122_Listener_onPlayerInteract_RightClickItem.invoke(.dynamic) ~[?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:96) ~[ASMEventHandler.class:1.12.2-dde44c8]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:186) ~[EventBus.class:1.12.2-dde44c8]
at net.minecraftforge.common.ForgeHooks.onItemRightClick(ForgeHooks.java:906) ~[ForgeHooks.class:1.12.2-dde44c8]
at net.minecraft.server.management.PlayerInteractionManager.func_187250_a(PlayerInteractionManager.java:435) ~[or.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_147346_a(NetHandlerPlayServer.java:1209) ~[pa.class:?]
at net.minecraft.network.play.client.CPacketPlayerTryUseItem.func_148833_a(CPacketPlayerTryUseItem.java:36) ~[mb.class:?]
at net.minecraft.network.play.client.CPacketPlayerTryUseItem.func_148833_a(CPacketPlayerTryUseItem.java:9) ~[mb.class:?]
at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:16) ~[hv.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_262]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_262]
at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:839) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:466) [nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:778) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:624) [MinecraftServer.class:?]

I regenned it, still got that error. problem persists.

fixed

commented

Forgot to mention this, but i did regen it.

> [03:03:56 ERROR]: Could not pass event InventoryOpenEvent to OldCombatMechanics v1.8.1
java.lang.AbstractMethodError: null
at org.bukkit.craftbukkit.v1_12_R1.inventory.CraftInventory.getLocation(CraftInventory.java:523) ~[CraftInventory.class:1.12.2-dde44c8]
at kernitus.plugin.OldCombatMechanics.module.ModuleOldBrewingStand.onInventoryOpen(ModuleOldBrewingStand.java:57) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor229.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:61) ~[EventExecutor.class:1.12.2-dde44c8]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[TimedEventExecutor.class:1.12.2-dde44c8]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:66) ~[RegisteredListener.class:1.12.2-dde44c8]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:484) ~[SimplePluginManager.class:1.12.2-dde44c8]
at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callInventoryOpenEvent(CraftEventFactory.java:907) ~[CraftEventFactory.class:1.12.2-dde44c8]
at net.minecraft.entity.player.EntityPlayerMP.func_71007_a(EntityPlayerMP.java:1085) ~[oq.class:?]
at pt.licious.shulkerbags.Listener.displayGUI(Listener.java:65) ~[Listener.class:?]
at pt.licious.shulkerbags.Listener.onPlayerInteract(Listener.java:42) ~[Listener.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_122_Listener_onPlayerInteract_RightClickItem.invoke(.dynamic) ~[?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:96) ~[ASMEventHandler.class:1.12.2-dde44c8]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:186) ~[EventBus.class:1.12.2-dde44c8]
at net.minecraftforge.common.ForgeHooks.onItemRightClick(ForgeHooks.java:906) ~[ForgeHooks.class:1.12.2-dde44c8]
at net.minecraft.server.management.PlayerInteractionManager.func_187250_a(PlayerInteractionManager.java:435) ~[or.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_147346_a(NetHandlerPlayServer.java:1209) ~[pa.class:?]
at net.minecraft.network.play.client.CPacketPlayerTryUseItem.func_148833_a(CPacketPlayerTryUseItem.java:36) ~[mb.class:?]
at net.minecraft.network.play.client.CPacketPlayerTryUseItem.func_148833_a(CPacketPlayerTryUseItem.java:9) ~[mb.class:?]
at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:16) ~[hv.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_262]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_262]
at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:839) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:466) [nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:778) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:624) [MinecraftServer.class:?]

I regenned it, still got that error. problem persists.

fixed

Cheers ๐Ÿ‘

commented

Oh... That error message looks like something changed in the API between versions, as if it's trying to call an abstract method...

commented

Gotcha. Anything I can do? If the problem is with Mohist, their devs are usually happy to help fix compatability problems with plugins. Otherwise I'm not sure.

commented

Can I ask what versions of stuff you're running again? And did you change them at all?

commented

I've been on the most recent version of OCM for a bit. I've kept it updated. Mohist same thing, Except they update multiple times per month. I usually get an update once a month~

My mohist is currently 2~ weeks outdated.

The latest Mohist version is 1.12.2-67 but you have 1.12.2-41. The latest version has been built on 2020-10-12 01:46:29. You should update to fix recent bugs !

So yeah, 1.12.2-41 mohist and 1.8.1 ocm. I've updated mohist multiple times since this was opened.