Skip to content

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

@theJ8910

Description

@theJ8910

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions