Skip to content

Conversation

@vercte
Copy link
Collaborator

@vercte vercte commented Nov 29, 2025

A screenshot of several basins on a rotating contraption, mounted on a mechanical bearing; the basins are filled with fluid.

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

  • Basin can now be accessed inside a contraption with a Portable Storage Interface or Portable Fluid Interface
  • Basin can now be emptied of items inside a contraption via a player right-clicking it with an empty hand (just like it works outside of a contraption)
  • Fluids are now visible inside a basin when on a contraption
  • A basin can dump its contents multiple times (if the items inside it are updated)

@vercte vercte marked this pull request as draft November 29, 2025 07:00
@vercte
Copy link
Collaborator Author

vercte commented Nov 29, 2025

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 BlockEntityRenderHelper (separating out the light calculation methods) and CreateCodecs (adding a basin inventory codec)

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.

1 participant