Class SmartFluid

java.lang.Object
net.minecraft.world.level.material.Fluid
net.minecraft.world.level.material.FlowingFluid
net.minecraftforge.fluids.ForgeFlowingFluid
com.forsteri.unlimitedfluidity.core.SmartFluid
All Implemented Interfaces:
net.minecraftforge.common.extensions.IForgeFluid
Direct Known Subclasses:
BehaviorableFluid

public abstract class SmartFluid extends net.minecraftforge.fluids.ForgeFlowingFluid

Simplifies the process of making fluid

  • Built in the required redundant FlowingFluid.LEVEL fluid state definition/default value
  • Built in the required redundant ForgeFlowingFluid.Source.getAmount(FluidState) that always returns 8
  • Built in the required redundant ForgeFlowingFluid.Source.getAmount(FluidState) that always returns the value of FlowingFluid.LEVEL property
Since:
1.0
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraftforge.fluids.ForgeFlowingFluid

    net.minecraftforge.fluids.ForgeFlowingFluid.Flowing, net.minecraftforge.fluids.ForgeFlowingFluid.Properties, net.minecraftforge.fluids.ForgeFlowingFluid.Source
  • Field Summary

    Fields inherited from class net.minecraft.world.level.material.FlowingFluid

    FALLING, LEVEL

    Fields inherited from class net.minecraft.world.level.material.Fluid

    FLUID_STATE_REGISTRY, stateDefinition
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    SmartFluid(net.minecraftforge.fluids.ForgeFlowingFluid.Properties properties)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    createFluidStateDefinition(@NotNull net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.material.Fluid,net.minecraft.world.level.material.FluidState> builder)
     
    protected abstract boolean
     
    final boolean
    isSource(@NotNull net.minecraft.world.level.material.FluidState p_76140_)
     

    Methods inherited from class net.minecraftforge.fluids.ForgeFlowingFluid

    beforeDestroyingBlock, canBeReplacedWith, canConvertToSource, canConvertToSource, createLegacyBlock, getBucket, getDropOff, getExplosionResistance, getFlowing, getFluidType, getPickupSound, getSlopeFindDistance, getSource, getTickDelay, isSame

    Methods inherited from class net.minecraft.world.level.material.FlowingFluid

    canSpreadTo, getAmount, getFlow, getFlowing, getHeight, getLegacyLevel, getNewLiquid, getOwnHeight, getShape, getSlopeDistance, getSource, getSpread, getSpreadDelay, isSolidFace, spread, spreadTo, tick

    Methods inherited from class net.minecraft.world.level.material.Fluid

    animateTick, builtInRegistryHolder, defaultFluidState, getDripParticle, getStateDefinition, is, isEmpty, isRandomlyTicking, randomTick, registerDefaultState

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeFluid

    canExtinguish, canHydrate, getAdjacentBlockPathType, getBlockPathType, getExplosionResistance, move, shouldUpdateWhileBoating, supportsBoating
  • Constructor Details

    • SmartFluid

      protected SmartFluid(net.minecraftforge.fluids.ForgeFlowingFluid.Properties properties)
  • Method Details

    • createFluidStateDefinition

      protected void createFluidStateDefinition(@NotNull net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.material.Fluid,net.minecraft.world.level.material.FluidState> builder)
      Overrides:
      createFluidStateDefinition in class net.minecraft.world.level.material.FlowingFluid
    • isSource

      protected abstract boolean isSource()
      Returns:
      whether the fluid state is source
    • isSource

      public final boolean isSource(@NotNull @NotNull net.minecraft.world.level.material.FluidState p_76140_)
      Specified by:
      isSource in class net.minecraft.world.level.material.Fluid