Skip to content

Mineshaft chances change between versions #19

@Captain-S0L0

Description

@Captain-S0L0

Mineshaft chances change between versions. Not sure how to implement this into the Seedra code in a proper way and I don't know exactly which console versions these changes occur in, so I'm just creating an issue here to document it.

I noticed this when working with TU7, as the current mineshaft implementation did not produce the correct results.

The changed chance is in structures/placement/mineshaft.cpp.
Currently, the check is if EXPECT_FALSE (rng.nextDouble() < 0.004). For versions equivalent to Java 1.7+, this works. However, this chance was different in older versions.
For Java 1.4-1.6, it is rng.nextDouble() < 0.01. For 1.0-1.3, it is rng.nextInt(100) == 0. For Beta 1.8, it is rng.nextInt(80) == 0.

Testing this by changing the check to rng.nextInt(100) == 0 results in producing accurate results for TU7.

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