Class FluidStackGizmo
java.lang.Object
design.aeonic.nifty.api.client.screen.input.AbstractGizmo
design.aeonic.nifty.api.client.screen.input.gizmos.FluidStackGizmo
- All Implemented Interfaces:
Gizmo
-
Constructor Summary
ConstructorsConstructorDescriptionFluidStackGizmo
(int x, int y, int width, int height, Supplier<FluidStack> fluidStack) FluidStackGizmo
(int x, int y, int width, int height, Supplier<FluidStack> fluidStack, Supplier<Integer> capacity) FluidStackGizmo
(int x, int y, int width, int height, Supplier<FluidStack> fluidStack, Supplier<Integer> capacity, Texture tankOverlay) FluidStackGizmo
(int x, int y, Supplier<FluidStack> fluidStack, Supplier<Integer> capacity, Texture tankOverlay) -
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(com.mojang.blaze3d.vertex.PoseStack stack, GizmoScreen screen, int mouseX, int mouseY, float partialTicks) int
List<net.minecraft.network.chat.Component>
getTooltip
(GizmoScreen screen, int mouseX, int mouseY) getTooltipStyle
(GizmoScreen screen, int mouseX, int mouseY) int
getWidth()
void
setHeight
(int height) void
setWidth
(int width) Methods inherited from class design.aeonic.nifty.api.client.screen.input.AbstractGizmo
getX, getY, isEnabled, mouseDown, playClickSound, setX, setY
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface design.aeonic.nifty.api.client.screen.input.Gizmo
getBottom, getRight, isWithinBounds, isWithinBounds, keyDown, keyUp, mouseScrolled, mouseUp, onClose, onLostFocus
-
Constructor Details
-
FluidStackGizmo
- Parameters:
x
- the x positiony
- the y positionwidth
- the widthheight
- the heightfluidStack
- the fluid stack
-
FluidStackGizmo
public FluidStackGizmo(int x, int y, int width, int height, Supplier<FluidStack> fluidStack, @Nullable Supplier<Integer> capacity) - Parameters:
x
- the x positiony
- the y positionwidth
- the widthheight
- the heightfluidStack
- the fluid stackcapacity
- the capacity, used to render partially full tanks - if null will just fill the given height
-
FluidStackGizmo
public FluidStackGizmo(int x, int y, Supplier<FluidStack> fluidStack, @Nullable Supplier<Integer> capacity, @Nonnull Texture tankOverlay) - Parameters:
x
- the x positiony
- the y positionfluidStack
- the fluid stackcapacity
- the capacity, used to render partially full tanks - if null will just fill the given heighttankOverlay
- the tank overlay texture - nonnull; this constructor infers dimensions from the texture size
-
FluidStackGizmo
public FluidStackGizmo(int x, int y, int width, int height, Supplier<FluidStack> fluidStack, @Nullable Supplier<Integer> capacity, @Nullable Texture tankOverlay) - Parameters:
x
- the x positiony
- the y positionwidth
- the widthheight
- the heightfluidStack
- the fluid stackcapacity
- the capacity, used to render partially full tanks - if null will just fill the given heighttankOverlay
- the tank overlay texture, if null will not render an overlay
-
-
Method Details
-
draw
public void draw(com.mojang.blaze3d.vertex.PoseStack stack, GizmoScreen screen, int mouseX, int mouseY, float partialTicks) -
getTooltip
@Nullable public List<net.minecraft.network.chat.Component> getTooltip(GizmoScreen screen, int mouseX, int mouseY) -
getTooltipStyle
-
getWidth
public int getWidth() -
setWidth
public void setWidth(int width) -
getHeight
public int getHeight() -
setHeight
public void setHeight(int height)
-