Skip to content
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

Add FluidState to LocatableBlock #2443

Merged
merged 1 commit into from
Jan 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/main/java/org/spongepowered/api/world/LocatableBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.spongepowered.api.block.BlockState;
import org.spongepowered.api.data.SerializableDataHolder;
import org.spongepowered.api.data.persistence.DataBuilder;
import org.spongepowered.api.fluid.FluidState;
import org.spongepowered.api.util.CopyableBuilder;
import org.spongepowered.api.world.server.ServerLocation;
import org.spongepowered.api.world.server.ServerWorld;
Expand All @@ -51,6 +52,11 @@ static Builder builder() {
*/
BlockState blockState();

/**
* Gets the {@link FluidState} for this locatable block.
*/
FluidState fluidState();

interface Builder extends org.spongepowered.api.util.Builder<LocatableBlock, Builder>, CopyableBuilder<LocatableBlock, Builder>,
DataBuilder<LocatableBlock> {

Expand All @@ -62,6 +68,11 @@ interface Builder extends org.spongepowered.api.util.Builder<LocatableBlock, Bui
*/
Builder state(BlockState blockState);

/**
* Sets the {@link FluidState} for this builder.
*/
Builder fluid(FluidState fluid);

/**
* Sets the {@link BlockState} and {@link Vector3i position} for this
* builder.
Expand Down