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

The Blumble zone pollen brushing crash #182

Closed
Ladocterus opened this issue Nov 13, 2023 · 2 comments
Closed

The Blumble zone pollen brushing crash #182

Ladocterus opened this issue Nov 13, 2023 · 2 comments

Comments

@Ladocterus
Copy link

canary-mc1.20.1-0.2.7

Expected Behavior

Brushing suspicious pollen in the mod "The bumble zone" like Minecraft Archaeology
https://modrinth.com/mod/the-bumblezone

Actual Behavior

Game crashes.

Reproduction Steps

Example:

  1. Using a Brush
  2. Brush Suspicious pollen
  3. Game crash

Other Information

Creator of The bumble zone added a Workaround to at least prevent crashes, but the pollen still doesn't brush.
According to creator the crash is caused by passing null as the heldItem into EntityCollisionContext.
crash-2023-11-08_16.25.11-server.txt
crash-2023-11-08_16.25.14-client.txt

@TelepathicGrunt
Copy link

This line seems to be the cause.

In general, NEVER use null for an itemstack. if you must, use Itemstack.EMPTY instead. However, I strongly am suspicious on the supposed performance benefit of setting these fields to null...

My use case was I needed the item directly from the context so I can check if it is in my brushing allowed tags or has brushing tool actions. So isHolding was not enough and I used an accessor to get that field. In vanilla, this field is never null. So this was a behavior change by Canary that forced me to add a null check when in vanilla, itemstack should never be null.
https:/TelepathicGrunt/Bumblezone/blob/cf5e4c67ba5de7713458651f05d888cc884b4752/common/src/main/java/com/telepathicgrunt/the_bumblezone/blocks/PileOfPollenSuspicious.java#L126

TelepathicGrunt/Bumblezone#299

@AbdElAziz333
Copy link
Owner

should be fixed in the new updates.

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

3 participants