Class ProgWidgetLiquidFilter

java.lang.Object
me.desht.pneumaticcraft.common.progwidgets.ProgWidget
me.desht.pneumaticcraft.common.progwidgets.ProgWidgetLiquidFilter
All Implemented Interfaces:
IProgWidgetBase, IProgWidget

public class ProgWidgetLiquidFilter extends ProgWidget
  • Constructor Details

    • ProgWidgetLiquidFilter

      public ProgWidgetLiquidFilter()
  • Method Details

    • withFilter

      public static ProgWidgetLiquidFilter withFilter(net.minecraft.world.level.material.Fluid fluid)
    • addErrors

      public void addErrors(List<net.minecraft.network.chat.Component> curInfo, List<IProgWidget> widgets)
      Specified by:
      addErrors in interface IProgWidget
      Overrides:
      addErrors in class ProgWidget
    • hasStepInput

      public boolean hasStepInput()
      Description copied from interface: IProgWidget
      Can this widget connect to a widget above?
      Returns:
      true if it can, false otherwise
    • returnType

      public ProgWidgetType<?> returnType()
      Description copied from interface: IProgWidget
      For parameter widgets that are added onto the left or right of another widget, get the type of the widget being connected to.
      Returns:
      the widget being connected to, or null if this widget isn't a parameter widget.
    • getParameters

      public List<ProgWidgetType<?>> getParameters()
      Description copied from interface: IProgWidget
      Get the types of the widgets which connect to this widget on the right, in order (top to bottom). Note that the length of the widget array returned by IProgWidget.getConnectedParameters() will be double the length of this list, since these widgets can be added on both the right (whitelist) and left (blacklist) sides.
      Returns:
      a list of widget types, or an empty list if no widgets can be added to the side of this widget
    • getTexture

      public net.minecraft.resources.ResourceLocation getTexture()
    • readFromNBT

      public void readFromNBT(net.minecraft.nbt.CompoundTag tag)
      Specified by:
      readFromNBT in interface IProgWidget
      Overrides:
      readFromNBT in class ProgWidget
    • writeToNBT

      public void writeToNBT(net.minecraft.nbt.CompoundTag tag)
      Description copied from interface: IProgWidget
      At least do tag.putString("name", getTypeID().toString());

      Note that the base implementation ProgWidget does this.

      Specified by:
      writeToNBT in interface IProgWidget
      Overrides:
      writeToNBT in class ProgWidget
      Parameters:
      tag - NBT tag to write to
    • writeToPacket

      public void writeToPacket(net.minecraft.network.FriendlyByteBuf buf)
      Specified by:
      writeToPacket in interface IProgWidget
      Overrides:
      writeToPacket in class ProgWidget
    • readFromPacket

      public void readFromPacket(net.minecraft.network.FriendlyByteBuf buf)
      Specified by:
      readFromPacket in interface IProgWidget
      Overrides:
      readFromPacket in class ProgWidget
    • getTooltip

      public void getTooltip(List<net.minecraft.network.chat.Component> curTooltip)
      Specified by:
      getTooltip in interface IProgWidget
      Overrides:
      getTooltip in class ProgWidget
    • isLiquidValid

      public static boolean isLiquidValid(net.minecraft.world.level.material.Fluid fluid, IProgWidget mainWidget, int filterIndex)
    • isLiquidValid

      public static boolean isLiquidValid(net.minecraft.world.level.material.Fluid fluid, List<ProgWidgetLiquidFilter> whitelist, List<ProgWidgetLiquidFilter> blacklist)
    • getDifficulty

      public IProgWidget.WidgetDifficulty getDifficulty()
    • getExtraStringInfo

      public List<net.minecraft.network.chat.Component> getExtraStringInfo()
      Specified by:
      getExtraStringInfo in interface IProgWidget
      Overrides:
      getExtraStringInfo in class ProgWidget
    • setFluid

      public void setFluid(net.minecraft.world.level.material.Fluid fluid)
    • getFluid

      public net.minecraft.world.level.material.Fluid getFluid()
    • getColor

      public net.minecraft.world.item.DyeColor getColor()