Class ComponentFluid
java.lang.Object
me.desht.pneumaticcraft.common.thirdparty.patchouli.ComponentFluid
- All Implemented Interfaces:
vazkii.patchouli.api.ICustomComponent,vazkii.patchouli.api.IVariablesAvailableCallback
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild(int componentX, int componentY, int pageNum) Called when this component is built, after variables have been resolved withIVariablesAvailableCallback.onVariablesAvailable(java.util.function.UnaryOperator<vazkii.patchouli.api.IVariable>).voidonVariablesAvailable(UnaryOperator<vazkii.patchouli.api.IVariable> lookup) Called when variables are available, before the template component is builtvoidrender(net.minecraft.client.gui.GuiGraphics graphics, vazkii.patchouli.api.IComponentRenderContext ctx, float pticks, int mouseX, int mouseY) Called every render tick.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface vazkii.patchouli.api.ICustomComponent
mouseClicked, onDisplayed
-
Field Details
-
fluid
public vazkii.patchouli.api.IVariable fluid -
scale
public vazkii.patchouli.api.IVariable scale
-
-
Constructor Details
-
ComponentFluid
public ComponentFluid()
-
-
Method Details
-
build
public void build(int componentX, int componentY, int pageNum) Description copied from interface:vazkii.patchouli.api.ICustomComponentCalled when this component is built, after variables have been resolved withIVariablesAvailableCallback.onVariablesAvailable(java.util.function.UnaryOperator<vazkii.patchouli.api.IVariable>). Take the chance to parse String variables into game objects, perform error checking, and setup any local positions here.- Specified by:
buildin interfacevazkii.patchouli.api.ICustomComponent
-
render
public void render(net.minecraft.client.gui.GuiGraphics graphics, vazkii.patchouli.api.IComponentRenderContext ctx, float pticks, int mouseX, int mouseY) Description copied from interface:vazkii.patchouli.api.ICustomComponentCalled every render tick. No special transformations are applied, so you're responsible for putting everything in the right place.- Specified by:
renderin interfacevazkii.patchouli.api.ICustomComponent
-
onVariablesAvailable
Description copied from interface:vazkii.patchouli.api.IVariablesAvailableCallbackCalled when variables are available, before the template component is built- Specified by:
onVariablesAvailablein interfacevazkii.patchouli.api.IVariablesAvailableCallback- Parameters:
lookup- Call with arbitrary text, and it will be expanded: first expanding all inline variables, then attempting to apply "->" derivations if possible, otherwise looking up the string as a plain variable from the template environment
Gracefully handles nulls given as input, but will never return null itself.
-