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

ExtendedLeavesBlock is not supported in leaf decay #11

Open
coderbot16 opened this issue Dec 16, 2020 · 0 comments
Open

ExtendedLeavesBlock is not supported in leaf decay #11

coderbot16 opened this issue Dec 16, 2020 · 0 comments

Comments

@coderbot16
Copy link

ExtendedLeavesBlock, used by Redwood and Hemlock leaves in Terrestria, doesn't subclass LeavesBlock because it uses a distance property that supports leaves being farther from trees than vanilla. Not extending LeavesBlock actually prevents a crash here because otherwise mods like this would have tried to retrieve the DISTANCE property which isn't present on redwood and hemlock leaves.

I think that there's a few things that could be done to fix this:

  • Use BlockTags.LEAVES instead of instanceof LeavesBlock
  • Instead of accessing the DISTANCE property, use hasRandomTicks to detect whether the leaf block can decay and randomTick to cause the leaf block to decay

While doing that could be a bit hacky, it also nicely supports both vanilla leaves and ExtendedLeavesBlock from Terraform.

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