Skip to content

Improve BlockColourGen by using block.getBlockState().getValidStates() #71

@Darkhax

Description

@Darkhax

Currently the code tries to get a block state for each of the possible meta combinations. This leads to more lookups than necessary and is a big contributor to the exceptions you have to catch. You can use block.getBlockState().getValidStates() to get an immutable list of all valid states. In the tests I ran, this lead to an increase in load times. This increase was slight in vanilla, but more noticeable in heavily modded environments.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions