-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Refactor Basin's behaviour on Contraptions #9632
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
base: mc1.21.1/dev
Are you sure you want to change the base?
Refactor Basin's behaviour on Contraptions #9632
Conversation
why does this work? it scares me
syncing still needs to be fixed
but at what cost?
|
Currently, the LerpedFloat dictating the visual basin fluid fill level doesn't persist between syncs; this makes it jump immediately to the current fill level, unlike a in-world basin. I may use the codec to sync the fill level, but I'm not sure yet. Some stuff I'd like to be double-checked on is my use of the codec and my modification of the non-basin classes, mainly |
Fail to fix the lerp animation once more
|
The checking every tick to pick up items may be problematic: there's a decent chance it breaks existing factories, and it may add not-insignificant lag to trains which use basins for decoration. I would suggest making that feature opt-in configurable. |
|
Hmm, perhaps this should use the same as funnels, where the The general expectation is that any contraption actor is ticked via the |
Would it be fine if I made a config for both Basins+Funnels? |
This PR refactors how basins work on contraptions.
It adds a MountedItemStorage and a MountedFluidStorage for basins on contraptions, both of which take the basins input/output section into account.
It also adds a BasinInteractionBehaviour that lets players right-click a basin on a contraption to take the items out; just like it would work in-world.
It also refactors BasinMovementBehaviour to use and update these storages accordingly. Additionally, this behaviour checks every tick in order to pick up items.
Finally, this adds methods to render the basin correctly in-contraption, including fluids and items.
Gameplay Changes