Skip to content

Conversation

@ghzdude
Copy link
Contributor

@ghzdude ghzdude commented Dec 27, 2024

What

refactor/simplify fluid tank list
potentially fixes an issue when nesting fluid tanks with differing same fluid fill
yeet overlayed fluid handler because it was redundant
add filtering to base gt item/fluid handlers

Implementation Details

IMultipleTankHandler is now an abstract class
FluidTankList is now final
IFilteredHandler has a generic to set IFilter
notifiable fluid lists are now IFluidTank instead of handler (usually tanks are passed in, and i haven't observed any immediate issues)

Outcome

fluid tank list somewhat less sussy

Potential Compatibility Issues

a handful of classes are now deprecated, but they should still function for now

@ghzdude ghzdude added the type: refactor Suggestion to refactor a section of code label Dec 27, 2024
Comment on lines -105 to -106
if (!(fluidTank instanceof IFluidHandler))
throw new IllegalStateException(
"Container IO is only supported for fluid tanks that implement IFluidHandler");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i do not know why this check was needed, as it's never required to be an IFluidHandler in the class.
either way, it'll be handled properly in the mui2 port

ghzdude added 2 commits April 11, 2025 18:49
make notifiable extend filtered
add javadoc for FilteredItemHandler
@ghzdude ghzdude marked this pull request as ready for review April 12, 2025 02:12
@ghzdude ghzdude requested a review from a team as a code owner April 12, 2025 02:12
use pattern matching
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: refactor Suggestion to refactor a section of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants