Class ProgWidgetLiquidFilter
java.lang.Object
me.desht.pneumaticcraft.common.progwidgets.ProgWidget
me.desht.pneumaticcraft.common.progwidgets.ProgWidgetLiquidFilter
- All Implemented Interfaces:
IProgWidgetBase,IProgWidget
-
Nested Class Summary
Nested classes/interfaces inherited from interface me.desht.pneumaticcraft.common.progwidgets.IProgWidget
IProgWidget.WidgetDifficulty -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddErrors(List<net.minecraft.network.chat.Component> curInfo, List<IProgWidget> widgets) net.minecraft.world.item.DyeColorgetColor()List<net.minecraft.network.chat.Component>net.minecraft.world.level.material.FluidgetFluid()List<ProgWidgetType<?>>Get the types of the widgets which connect to this widget on the right, in order (top to bottom).net.minecraft.resources.ResourceLocationvoidgetTooltip(List<net.minecraft.network.chat.Component> curTooltip) booleanCan this widget connect to a widget above?static booleanisLiquidValid(net.minecraft.world.level.material.Fluid fluid, List<ProgWidgetLiquidFilter> whitelist, List<ProgWidgetLiquidFilter> blacklist) static booleanisLiquidValid(net.minecraft.world.level.material.Fluid fluid, IProgWidget mainWidget, int filterIndex) voidreadFromNBT(net.minecraft.nbt.CompoundTag tag) voidreadFromPacket(net.minecraft.network.FriendlyByteBuf buf) For parameter widgets that are added onto the left or right of another widget, get the type of the widget being connected to.voidsetFluid(net.minecraft.world.level.material.Fluid fluid) static ProgWidgetLiquidFilterwithFilter(net.minecraft.world.level.material.Fluid fluid) voidwriteToNBT(net.minecraft.nbt.CompoundTag tag) At least dotag.putString("name", getTypeID().toString());voidwriteToPacket(net.minecraft.network.FriendlyByteBuf buf) Methods inherited from class me.desht.pneumaticcraft.common.progwidgets.ProgWidget
addWarnings, canBeRunByComputers, canSetParameter, copy, fromNBT, fromPacket, getConnectedParameters, getHeight, getMaxUV, getOutputWidget, getOutputWidget, getParent, getType, getTypeID, getWidgetAI, getWidgetTargetAI, getWidth, getX, getY, hasBlacklist, hasStepOutput, isAvailable, setOutputWidget, setParameter, setParent, setX, setYMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.desht.pneumaticcraft.common.progwidgets.IProgWidget
freeToUse, getTranslationKey, isDifficultyOK
-
Constructor Details
-
ProgWidgetLiquidFilter
public ProgWidgetLiquidFilter()
-
-
Method Details
-
withFilter
-
addErrors
public void addErrors(List<net.minecraft.network.chat.Component> curInfo, List<IProgWidget> widgets) - Specified by:
addErrorsin interfaceIProgWidget- Overrides:
addErrorsin classProgWidget
-
hasStepInput
public boolean hasStepInput()Description copied from interface:IProgWidgetCan this widget connect to a widget above?- Returns:
- true if it can, false otherwise
-
returnType
Description copied from interface:IProgWidgetFor 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
Description copied from interface:IProgWidgetGet 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 byIProgWidget.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:
readFromNBTin interfaceIProgWidget- Overrides:
readFromNBTin classProgWidget
-
writeToNBT
public void writeToNBT(net.minecraft.nbt.CompoundTag tag) Description copied from interface:IProgWidgetAt least dotag.putString("name", getTypeID().toString());Note that the base implementation
ProgWidgetdoes this.- Specified by:
writeToNBTin interfaceIProgWidget- Overrides:
writeToNBTin classProgWidget- Parameters:
tag- NBT tag to write to
-
writeToPacket
public void writeToPacket(net.minecraft.network.FriendlyByteBuf buf) - Specified by:
writeToPacketin interfaceIProgWidget- Overrides:
writeToPacketin classProgWidget
-
readFromPacket
public void readFromPacket(net.minecraft.network.FriendlyByteBuf buf) - Specified by:
readFromPacketin interfaceIProgWidget- Overrides:
readFromPacketin classProgWidget
-
getTooltip
- Specified by:
getTooltipin interfaceIProgWidget- Overrides:
getTooltipin classProgWidget
-
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
-
getExtraStringInfo
- Specified by:
getExtraStringInfoin interfaceIProgWidget- Overrides:
getExtraStringInfoin classProgWidget
-
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()
-