Globox1997 / tiered

https://modrinth.com/mod/tieredz
https://www.curseforge.com/minecraft/mc-mods/tieredz
MIT License
1 stars 15 forks source link

Bows dealing random damage between 0-20 no matter tier #64

Closed slovinsqui closed 11 months ago

slovinsqui commented 1 year ago

I saw someone else having this problem in the issues page, closed because it got tagged with a won´t fix in another mod´s github saying it must be an incompatibility

I decided to remove the rest of the mods in my modpack to test it myself, as a result the inconsistencies still happen, only having two mods

some times there is no damage at all, but there is knockback and damage flashing

mods: one that indicates damage inflicted and a datapack displaying the mobs health

https://www.planetminecraft.com/data-pack/splatus-vanilla-refresh-quality-of-life/

https://www.curseforge.com/minecraft/mc-mods/damage-indicator-mod

maybe it´s not about incompatibility (or intentional??) but i dunno, im not a coder

Globox1997 commented 1 year ago

Have to look into this, which mod version?

slovinsqui commented 1 year ago

Minecraft 1.19.2 fabric 0.14.19 TieredZ 1.2.6

Globox1997 commented 1 year ago

Should be fixed with https://github.com/Globox1997/tiered/commit/55c2830657654fe6f1ab45166b8299119f5aff27

slovinsqui commented 1 year ago

I ran a quick test and it seems that the non damaging shot is gone, but the 20 damage to bows with no current tier is still there, I don't have time to test this at the moment but i'll check it out later

slovinsqui commented 1 year ago

yeah, the 0 damage thing is gone, but the normal bows still reach 19 damage (without enchantments)

Globox1997 commented 1 year ago

If the player has crit chance that might be possible yea :)

slovinsqui commented 1 year ago

oooh that's a thing??? my bad lol how does it work tho?

Globox1997 commented 1 year ago

If you have positive range crit chance, you might do more damage vice versa.

slovinsqui commented 1 year ago

do players get a default crit chance without armors?

Globox1997 commented 1 year ago

armor should not give crit chance at all but the bow for example can give crit chance

slovinsqui commented 1 year ago

wait, so crits can still happen regardless of the crit chance stat? I thought non tiered bows had no crits at all, i mean, that´s what I understood lol is there a way to tweak crit chances and critical damage?

btw sorry if Im being too insistent lol

Globox1997 commented 1 year ago

If bows have no tier, armor can give crit chance too Without crit chance, it doesn't affect the vanilla mechanic

slovinsqui commented 1 year ago

oh, well I get 20 dmg crits with non tiered bows even with no armor equiped, that´s what got me confused in the first place Is that intented?

Globox1997 commented 1 year ago

No this is not intended

slovinsqui commented 1 year ago

Just cheking in, is there going to be a fix for this version?

snoandpetals commented 11 months ago

Can confirm that this mod alone makes standard bows (bows pulled from the creative inventory without any tier) more OP

Non-tiered bow damage without mod installed: 8-10 Non-tiered bow damage with mod installed: 12-19

I suspect the issue lies here, you're modifying the damage the bow outputs to be the regular damage plus what crit damage would be https://github.com/Globox1997/tiered/blob/1.20/src/main/java/draylar/tiered/mixin/BowItemMixin.java

snoandpetals commented 11 months ago
persistentProjectileEntity.setDamage(
                persistentProjectileEntity.getDamage() + AttributeHelper.getExtraCritDamage((PlayerEntity) persistentProjectileEntity.getOwner(), (float) persistentProjectileEntity.getDamage()));
    }

the getExtraCritDamage already returns oldDamage, so by adding it TO persistentProjectileEntity.getDamage() you're effectively doubling your damage for bows I compiled a version without persistentProjectileEntity.getDamage() and it seems to work better

Globox1997 commented 11 months ago

Thank you @snoandpetals fixed with https://github.com/Globox1997/tiered/commit/da0d2b7123822461bf0cc9edeac7d38422b3544e