MinecraftschurliMods / Ars-Magica-Legacy

Port of Mithion's Ars Magica 2 mod for Minecraft 1.18 and above.
https://www.curseforge.com/minecraft/mc-mods/ars-magica-legacy
Other
11 stars 6 forks source link

[Bug]: Dryad's spawn bonemeal even when 'bonemeal_chance' set to 0.0 in the config #412

Closed NesCafe62 closed 2 months ago

NesCafe62 commented 11 months ago

Describe the bug

Even if entities.dryad.bonemeal_chance is set to zero dryads will still spawn bonemeal. (actually this was really really annoying... so much that I decided to recompile it from sources to fix XD) After a few hours there is tall grass on every single block! can't see skeletons shooring at you or creepers, can't fight mobs because you hit grass instead.

https://github.com/MinecraftschurliMods/Ars-Magica-Legacy/blob/version/1.19.x/src/main/java/com/github/minecraftschurlimods/arsmagicalegacy/common/entity/Dryad.java#L55

if (level.random.nextDouble() < Config.SERVER.DRYAD_BONEMEAL_CHANCE.get()) return;

this check should be nextDouble >= chance because it does return (meaning not spawn bonemeal) if condition passes

p.s experienced it in 1.18.2 version, but checking is the same in latest code

Steps to Reproduce

No response

Expected behavior

setting entities.dryad.bonemeal_chance to zero should prevent dryads from spawn bonemeal. and it should work correctly for any other value

Screenshots

No response

Version

1.18.2-1.3.0

Forge Version

40.2.9

Other Mods

Log

No response

Minecraftschurli commented 11 months ago

If you already cloned the repo and compiled the fix yourself why not submit a pull request? But yea that is a bug.

NesCafe62 commented 11 months ago

I just did it locally, have not forked the repo. but I did not know what versions (branches) need this fix. but sure I can make a pull request if you tell which branches need this fix (I suppose all of them?)

Minecraftschurli commented 11 months ago

just do one for 1.18.2 then we can cherry-pick it to the other versions