Class Hatch

java.lang.Object
com.gtnewhorizons.horizonqa.api.gt.Hatch

public final class Hatch extends Object
View of a hatch tile resolved from a controller. Fluid methods use the meta tile entity as IFluidHandler, same idea as GTNHGameTestHelper.fillHatch(com.gtnewhorizons.horizonqa.api.TestPos, java.lang.String, int).
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    assertContains(String fluidName, int amount)
    Passes when the hatch contains at least amount mB of the fluid registered as fluidName.
    void
    assertContains(net.minecraftforge.fluids.FluidStack fluid)
    Passes when the hatch contains at least fluid.amount mB of the given fluid.
    void
    Passes when the hatch holds no fluid.
    fill(String fluidName, int amount)
    Fills this hatch with amount mB of the fluid registered as fluidName.
    fill(net.minecraftforge.fluids.FluidStack fluid)
     
    supply(long voltage, long amperage, int durationTicks)
    Registers a virtual EU supply job on this hatch.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • supply

      public Hatch supply(long voltage, long amperage, int durationTicks)
      Registers a virtual EU supply job on this hatch. Starting from the next time-warp pass (via GTNHGameTestHelper.fastForwardTicks(int) or Multiblock.runRecipe()), this hatch will receive voltage × amperage EU per simulated tick for durationTicks ticks.
      Throws:
      IllegalStateException - if this hatch was not constructed with a helper reference (not an energy hatch)
    • fill

      public Hatch fill(net.minecraftforge.fluids.FluidStack fluid)
    • fill

      public Hatch fill(String fluidName, int amount)
      Fills this hatch with amount mB of the fluid registered as fluidName.
      Throws:
      IllegalArgumentException - if fluidName is not a known fluid registry name
    • assertContains

      public void assertContains(net.minecraftforge.fluids.FluidStack fluid)
      Passes when the hatch contains at least fluid.amount mB of the given fluid. Handles MTEHatchMultiInput correctly by checking all internal fluid slots rather than relying on the single-slot drain() view.
    • assertContains

      public void assertContains(String fluidName, int amount)
      Passes when the hatch contains at least amount mB of the fluid registered as fluidName.
      Throws:
      IllegalArgumentException - if fluidName is not a known fluid registry name
    • assertEmpty

      public void assertEmpty()
      Passes when the hatch holds no fluid. Handles MTEHatchMultiInput correctly by checking all internal fluid slots.