Class FluidCraftingMonitorElement
java.lang.Object
com.refinedmods.refinedstorage.apiimpl.autocrafting.craftingmonitor.FluidCraftingMonitorElement
- All Implemented Interfaces:
ICraftingMonitorElement
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFluidCraftingMonitorElement
(net.neoforged.neoforge.fluids.FluidStack stack, int stored, int missing, int processing, int scheduled, int crafting) -
Method Summary
Modifier and TypeMethodDescriptionint
void
draw
(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, IElementDrawers drawers) int
net.minecraft.resources.ResourceLocation
Returns the id for the base of this element, used for sorting in theCraftingMonitorElementList
net.minecraft.resources.ResourceLocation
getId()
Returns the id of this element, used for serialization and deserialization over the network.List<net.minecraft.network.chat.Component>
boolean
merge
(ICraftingMonitorElement element) Merge an element into the current element.static FluidCraftingMonitorElement
read
(net.minecraft.network.FriendlyByteBuf buf) void
write
(net.minecraft.network.FriendlyByteBuf buf) Writes the data to the network.
-
Field Details
-
ID
public static final net.minecraft.resources.ResourceLocation ID
-
-
Constructor Details
-
FluidCraftingMonitorElement
public FluidCraftingMonitorElement(net.neoforged.neoforge.fluids.FluidStack stack, int stored, int missing, int processing, int scheduled, int crafting)
-
-
Method Details
-
read
-
draw
public void draw(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, IElementDrawers drawers) - Specified by:
draw
in interfaceICraftingMonitorElement
- Parameters:
graphics
- the graphicsx
- position on the x axis to rendery
- position on the y axis to renderdrawers
- the drawers that this element can use
-
getBaseId
public net.minecraft.resources.ResourceLocation getBaseId()Description copied from interface:ICraftingMonitorElement
Returns the id for the base of this element, used for sorting in theCraftingMonitorElementList
- Specified by:
getBaseId
in interfaceICraftingMonitorElement
- Returns:
- the id
-
getId
public net.minecraft.resources.ResourceLocation getId()Description copied from interface:ICraftingMonitorElement
Returns the id of this element, used for serialization and deserialization over the network.- Specified by:
getId
in interfaceICraftingMonitorElement
- Returns:
- the id
-
getTooltip
- Specified by:
getTooltip
in interfaceICraftingMonitorElement
- Returns:
- the tooltip of this element
-
write
public void write(net.minecraft.network.FriendlyByteBuf buf) Description copied from interface:ICraftingMonitorElement
Writes the data to the network.- Specified by:
write
in interfaceICraftingMonitorElement
- Parameters:
buf
- the buffer
-
merge
Description copied from interface:ICraftingMonitorElement
Merge an element into the current element.- Specified by:
merge
in interfaceICraftingMonitorElement
- Parameters:
element
- the element to merged with the current one- Returns:
- true if merge was successful, false otherwise
-
baseElementHashCode
public int baseElementHashCode()- Specified by:
baseElementHashCode
in interfaceICraftingMonitorElement
- Returns:
- the hash code for the underlying base item/fluid element
-
elementHashCode
public int elementHashCode()- Specified by:
elementHashCode
in interfaceICraftingMonitorElement
- Returns:
- the hash code for the underlying element
-