Class Hatch
java.lang.Object
com.gtnewhorizons.horizonqa.api.gt.Hatch
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 TypeMethodDescriptionvoidassertContains(String fluidName, int amount) Passes when the hatch contains at leastamountmB of the fluid registered asfluidName.voidassertContains(net.minecraftforge.fluids.FluidStack fluid) Passes when the hatch contains at leastfluid.amountmB of the given fluid.voidPasses when the hatch holds no fluid.Fills this hatch withamountmB of the fluid registered asfluidName.fill(net.minecraftforge.fluids.FluidStack fluid) supply(long voltage, long amperage, int durationTicks) Registers a virtual EU supply job on this hatch.
-
Method Details
-
supply
Registers a virtual EU supply job on this hatch. Starting from the next time-warp pass (viaGTNHGameTestHelper.fastForwardTicks(int)orMultiblock.runRecipe()), this hatch will receivevoltage × amperageEU per simulated tick fordurationTicksticks.- Throws:
IllegalStateException- if this hatch was not constructed with a helper reference (not an energy hatch)
-
fill
-
fill
Fills this hatch withamountmB of the fluid registered asfluidName.- Throws:
IllegalArgumentException- iffluidNameis not a known fluid registry name
-
assertContains
public void assertContains(net.minecraftforge.fluids.FluidStack fluid) Passes when the hatch contains at leastfluid.amountmB of the given fluid. HandlesMTEHatchMultiInputcorrectly by checking all internal fluid slots rather than relying on the single-slotdrain()view. -
assertContains
Passes when the hatch contains at leastamountmB of the fluid registered asfluidName.- Throws:
IllegalArgumentException- iffluidNameis not a known fluid registry name
-
assertEmpty
public void assertEmpty()Passes when the hatch holds no fluid. HandlesMTEHatchMultiInputcorrectly by checking all internal fluid slots.
-