ExtraHoppers/src/main/java/net/shadowfacts/extrahoppers/util/DynamicFluidStateProvider.java

28 lines
792 B
Java

package net.shadowfacts.extrahoppers.util;
import net.minecraft.block.BlockState;
import net.minecraft.fluid.FluidState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import org.jetbrains.annotations.NotNull;
/**
* @author shadowfacts
*/
public interface DynamicFluidStateProvider {
FluidState getFluidState(@NotNull BlockState state, @NotNull BlockView world, @NotNull BlockPos pos);
@NotNull
FlowResult allowsFlow(@NotNull Direction toSide, @NotNull BlockState state, @NotNull BlockView world, @NotNull BlockPos pos);
void setEmptyFluid(@NotNull World world, @NotNull BlockPos pos);
enum FlowResult {
ALLOW,
DENY,
DEFAULT
}
}