Skip to content

Fix pipenet insertion NPE caused by isFaceBlocked#2844

Merged
Zorbatron merged 1 commit into
GregTechCEu:masterfrom
MCTian-mi:pipe-faceblocked
Aug 7, 2025
Merged

Fix pipenet insertion NPE caused by isFaceBlocked#2844
Zorbatron merged 1 commit into
GregTechCEu:masterfrom
MCTian-mi:pipe-faceblocked

Conversation

@MCTian-mi

Copy link
Copy Markdown
Contributor

What

Some machines (like RFTools storage scanner) would get the itemNetHandler with the facing null, and throw a NPE when trying to insert things due to isFaceBlocked calling EnumFacing#getIndex()

This would also fix the same potential crash for fluid pipenets

@MCTian-mi MCTian-mi requested a review from a team as a code owner August 4, 2025 12:17
@Zorbatron Zorbatron added the type: bug Something isn't working label Aug 4, 2025

@Zorbatron Zorbatron left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably would've been caught much earlier if at all, if we used more static analysis annotations. I'm planning to go through and spam a whole bunch of @NotNull and @nullable at some point (and general formatting fixes) so hopefully we won't get jumpscared by nulls ever again :clueless:

@Zorbatron

Copy link
Copy Markdown
Member

Sorry for the pings NotNull and nullable

@Zorbatron Zorbatron merged commit c8a316f into GregTechCEu:master Aug 7, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants