Skip to content

Add Block#isFluidReplaceable#13950

Open
JustAHuman-xD wants to merge 3 commits into
PaperMC:mainfrom
JustAHuman-xD:feat/block-fluid-replaceable
Open

Add Block#isFluidReplaceable#13950
JustAHuman-xD wants to merge 3 commits into
PaperMC:mainfrom
JustAHuman-xD:feat/block-fluid-replaceable

Conversation

@JustAHuman-xD

Copy link
Copy Markdown
Contributor

We have Block#isReplaceable but we don't have any way of checking if its replaceable with a fluid, this just exposes that as well.

@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Jun 11, 2026
@Lulu13022002

Copy link
Copy Markdown
Contributor

canBeReplaced(Fluid) is just equivalent to state.canBeReplaced() || !state.isSolid() with two exceptions for end blocks. So i'm not sure this is really needed, the fluid parameter is not even used currently.

@JustAHuman-xD

JustAHuman-xD commented Jun 13, 2026

Copy link
Copy Markdown
Contributor Author

canBeReplaced(Fluid) is just equivalent to state.canBeReplaced() || !state.isSolid() with two exceptions for end blocks. So i'm not sure this is really needed, the fluid parameter is not even used currently.

I would argue for intuitiveness this is still a good addition, no developer that doesn't check or already know the NMS logic is going to intuitively know/guess that a block can be replaced by fluids only if either block.isReplaceable() or !block.isSolid(), and if Minecraft ever does add blocks with more complex behavior (such as using the fluid parameter) then it would be automatically handled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

2 participants