Skip to content

Call setPlacedBy with the Placer Block's Player to transfer components when placing blocks#708

Open
epiccoleman wants to merge 1 commit intoRearth:1.21from
epiccoleman:issue-707-placer-loses-portable-tank-fluids
Open

Call setPlacedBy with the Placer Block's Player to transfer components when placing blocks#708
epiccoleman wants to merge 1 commit intoRearth:1.21from
epiccoleman:issue-707-placer-loses-portable-tank-fluids

Conversation

@epiccoleman
Copy link

Description

This PR adds a call to setPlacedBy, using the Placer Block's Player entity, when the Placer machine places a block.

This ensures that placed blocks, like Portable Tanks, utilize their internal logic for copying custom components (like Fluid count) when placed by the Placer block.

Fixes #707

How Has This Been Tested?

Tested in both Neoforge 21.2.219 and Fabric 0.18.4, using the same apparatus used to produce the bug described in #707 .

With the fix in place, when a filled portable tank is placed by the Placer Block, the tank is placed with the appropriate amount of fluid, as a player might intuitively expect.

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.

Placer Block Doesn't Preserve Fluid In Portable Tanks

1 participant