Class FluidCraftingPreviewElement

java.lang.Object
com.refinedmods.refinedstorage.apiimpl.autocrafting.preview.FluidCraftingPreviewElement
All Implemented Interfaces:
ICraftingPreviewElement

public class FluidCraftingPreviewElement extends Object implements ICraftingPreviewElement
  • Field Details

    • ID

      public static final net.minecraft.resources.ResourceLocation ID
  • Constructor Details

    • FluidCraftingPreviewElement

      public FluidCraftingPreviewElement(net.neoforged.neoforge.fluids.FluidStack stack)
    • FluidCraftingPreviewElement

      public FluidCraftingPreviewElement(net.neoforged.neoforge.fluids.FluidStack stack, int available, boolean missing, int toCraft)
  • Method Details

    • read

      public static FluidCraftingPreviewElement read(net.minecraft.network.FriendlyByteBuf buf)
    • write

      public void write(net.minecraft.network.FriendlyByteBuf buf)
      Specified by:
      write in interface ICraftingPreviewElement
      Parameters:
      buf - buffer to write to
    • getStack

      public net.neoforged.neoforge.fluids.FluidStack getStack()
    • draw

      public void draw(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, IElementDrawers drawers)
      Specified by:
      draw in interface ICraftingPreviewElement
      Parameters:
      graphics - the graphics
      x - position on the x axis to render
      y - position on the y axis to render
      drawers - the drawers this element can use
    • addAvailable

      public void addAvailable(int amount)
    • addToCraft

      public void addToCraft(int amount)
    • setMissing

      public void setMissing(boolean missing)
    • doesDisableTaskStarting

      public boolean doesDisableTaskStarting()
      Specified by:
      doesDisableTaskStarting in interface ICraftingPreviewElement
      Returns:
      true when this crafting preview elements signifies an error that disables starting a task
    • getId

      public net.minecraft.resources.ResourceLocation getId()
      Description copied from interface: ICraftingPreviewElement
      Returns the id of this element, used for serialization and deserialization over the network.
      Specified by:
      getId in interface ICraftingPreviewElement
      Returns:
      the id