Package net.neoforged.neoforge.oldtest
Class FluidUtilTest
java.lang.Object
net.neoforged.neoforge.oldtest.FluidUtilTest
Various tests for
FluidUtil
, that run when the mod is loaded.
If one of the tests fails, an expection will be thrown, and mod loading will fail with an error.
If all tests pass, the mod will load successfully.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
checkFluidStack
(FluidStack stack, Fluid fluid, int amount) private static void
checkItemStack
(ItemStack stack, Item item, int count) private static void
runTests
(net.neoforged.fml.event.lifecycle.FMLLoadCompleteEvent commonSetupEvent) private static void
Ensures that tryEmptyContainer doesn't change the target fluid handler when simulating.private static void
Ensures that tryEmptyContainerAndStow doesn't duplicate fluids in the target when the container is stackable.private static void
Ensures that tryFillContainer doesn't change the target fluid handler when simulating.
-
Field Details
-
MODID
- See Also:
-
-
Constructor Details
-
FluidUtilTest
public FluidUtilTest(net.neoforged.bus.api.IEventBus modEventBus)
-
-
Method Details
-
runTests
private static void runTests(net.neoforged.fml.event.lifecycle.FMLLoadCompleteEvent commonSetupEvent) -
test_tryEmptyContainer
private static void test_tryEmptyContainer()Ensures that tryEmptyContainer doesn't change the target fluid handler when simulating. Regression test for the root cause of issue #6796. -
test_tryFillContainer
private static void test_tryFillContainer()Ensures that tryFillContainer doesn't change the target fluid handler when simulating. Ant that the result of the simulated transfver is valid. Regression test for the root cause of issue #6796. -
test_tryEmptyContainerAndStow_stackable
private static void test_tryEmptyContainerAndStow_stackable()Ensures that tryEmptyContainerAndStow doesn't duplicate fluids in the target when the container is stackable. Regression test for issue #6796. -
checkItemStack
-
checkFluidStack
-