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

IFluidHandlerWrapper implementation cleanup #5551

Closed
wants to merge 6 commits into from

Conversation

pupnewfster
Copy link
Member

@pupnewfster pupnewfster commented Jul 3, 2019

Changes proposed in this pull request:

  • Add some default implementations into IFluidHandlerWrapper so less code is needed when only implementing one of fill and drain support. (Both default to being unsupported).
  • Change where null fluid stacks get caught for IFluidHandlerWrapper to ensure the logic is simpler about what happens where. This includes changing some things from @Nullable to @Nonnull
  • Add assumptions that canDrain and canFill get called before drain and fill respectively.
  • Default drain by fluidstack type to drain by amount as canDrain already checked the type is correct
  • Cleanup Entangloporter InventoryFrequency to use TileUtils for gas and fluid syncing
  • Unify some of the fluid comparison code, checking NBT of fluidstacks in even more places for the fluid now.
  • Implement drain method for TileEntityTurbineVent as previously only canDrain was implemented.
  • Some ejecting from multiblocks now use the EmitUtils#forEachSide to ensure the tile it is trying to eject to is loaded.

This PR fixes #5550 and various other oddities with our fluid handlers by cleaning up the IFluidHandlerWrapper code a good bit making it easier to read/manage.

@pupnewfster pupnewfster added this to the 9.7.9 milestone Jul 3, 2019
@pupnewfster pupnewfster marked this pull request as ready for review July 4, 2019 15:16
@pupnewfster pupnewfster requested a review from thiakil July 4, 2019 15:16
@thiakil thiakil closed this in 7a726f3 Jul 6, 2019
@thiakil
Copy link
Member

thiakil commented Jul 6, 2019

Merged manually.

Comment was removed and doFill param was passed on

@pupnewfster pupnewfster deleted the fluid_handler_wrapper branch July 6, 2019 14:21
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

Successfully merging this pull request may close these issues.

Mechanical pipe not pulling from quantum entangloporter
2 participants