Load cubes when fetching tile entities from unloaded cubes - #100
Merged
Conversation
|
Trying to figure out what caused this nearly drove me insane |
DarkShadow44
reviewed
Aug 6, 2026
DarkShadow44
approved these changes
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
There was an odd corruption bug related to GT pipes, but it also applied to some machines. It was caused by one cube remaining loaded while another unloads. When a pipe tried to push fluids into an unloaded cube, it would check for an existing tile in that position via
Chunk.func_150806_e. Since the target cube was unloaded, it would see no tile. This is because I previously changed ColumnTileEntityMap to only check loaded cubes for tiles. Sincefunc_150806_esaw no tiles in the location, it would then callgetBlockto check if the position should have a tile.getBlockloads the tile, and returnsgt.blockmachines.hasTileEntityreturns true for the given meta, sofunc_150806_ecreates a new (invalid) tile for the given meta and puts it in the TE map, inserting it into the cube. From that point on, the tile in that location is no longer valid.There were two ways I could've fixed this. The first is what I chose to do - I restored ColumnTileEntityMap to its old behaviour of loading cubes. The other solution would be to no-op
func_150806_eby returning null when the target cube was unloaded, but I figured this would cause similar issues so I went with the first solution.fixes: #78
Checklist