Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mariculture adds +10% to configured fishing gear zombie chance [Mariculture Deluxe 1.3.0-6, MC 1.7.10] #369

Open
theJ8910 opened this issue Jan 15, 2018 · 0 comments

Comments

@theJ8910
Copy link

theJ8910 commented Jan 15, 2018

I noticed fishing zombies spawning very frequently, and considering these zombies are empowered with speed, strength, and resistance, they were a major problem for early game players. I didn't want to completely disable them, so I went into config/Mariculture/general-stuff.cfg and set "Zombie > Spawn with Fishing Gear Chance > 0-1" to 0.005. Despite this, fishing gear zombies still seemed to spawn too frequently. So, I got to browsing the source code and I noticed the following line:

if (event.world.rand.nextFloat() - 0.1F < GeneralStuff.FISHING_GEAR_CHANCE)

Assuming that nextFloat() returns a number in the range [0,1], subtracting 0.1F here is effectively adding a 10% chance on top of what the user has configured. Removing the - 0.1F here should fix the problem.

Edit:
I didn't notice this version was no longer supported until after I posted. Feel free to tag the issue as such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant