`isIn` on item sometimes causes NPE in TagDelegate
See original GitHub issueThis is a really mysterious bug.
I’ve got a mixin on Block#calcBlockBreakingDelta
that checks if the item the player is holding is in a specific tag, using isIn
. When this happens, sometimes an NPE is thrown from TagDelegate#contains
.
However, nothing seems to be null.
This happens roughly 1 in every 5 runs randomly, and only once. This is the deepest in the stack trace reported.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
java - What is a NullPointerException, and how do I fix it?
Yes check if the object equals null before you invoke a method on it or try to access a variable it might have....
Read more >How to Fix and Avoid NullPointerException in Java - Rollbar
NullPointerException in Java occurs when a variable is accessed which is not pointing to any object and refers to nothing or null.
Read more >Java NullPointerException - Detect, Fix, and Best Practices
Some of the common reasons for NullPointerException in java programs are: Invoking a method on an object instance but at runtime the object...
Read more >How to deal with NullPointerException in Java with Examples
1. Java NullPointerException while calling instance method on null object. This is probably the most common cause of this error, you ...
Read more >NullPointerException de-reference a null object in Apex code ...
Knowledge Article Number, 000385601. Description. The execution of a trigger will sometimes generate an error message, "execution of [EventName] caused by: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@uiytt You misunderstood here.
BlockTags
are vanilla tags using vanilla constructs. This problem is with fabric api-provided identified tags that doesn’t always update when vanilla tag managers reload from disc.Since that in 1.16 minecraft check when every block is broken for :
And while playing minecraft in .16.2 with fabric Loader 0.9.2+build.206 and fabric-api 0.19.0+build.398-1.16, I never had a single crash or error for
TagDelegate#contains
. I assume this mean it was fixed.EDIT : Sorry for the wrong test 😦