Class AnvilUpdateEventTests
java.lang.Object
net.neoforged.neoforge.debug.crafting.AnvilUpdateEventTests
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final record
Holds the pieces every test needs after setup. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final net.minecraft.world.item.ItemStack
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static void
private static void
clearInputs
(net.minecraft.world.inventory.AnvilMenu menu, net.minecraft.world.entity.player.Player player) (package private) static void
(package private) static void
private static void
moveItemsToInputs
(net.minecraft.world.inventory.AnvilMenu menu, net.minecraft.world.entity.player.Player player) (package private) static void
renameTest
(DynamicTest test) private static net.minecraft.world.item.ItemStack
(package private) static void
(package private) static void
private static void
withAnvil
(DynamicTest test, Consumer<AnvilUpdateEventTests.Context> body) Common anvil, player and menu setup.
-
Field Details
-
MENU_SLOT_LEFT
private static final int MENU_SLOT_LEFT- See Also:
-
MENU_SLOT_RIGHT
private static final int MENU_SLOT_RIGHT- See Also:
-
MENU_SLOT_RESULT
private static final int MENU_SLOT_RESULT- See Also:
-
MENU_SLOT_INV_FIRST
private static final int MENU_SLOT_INV_FIRST- See Also:
-
MENU_SLOT_INV_SECOND
private static final int MENU_SLOT_INV_SECOND- See Also:
-
INVENTORY_SLOT_FIRST
private static final int INVENTORY_SLOT_FIRST- See Also:
-
INVENTORY_SLOT_SECOND
private static final int INVENTORY_SLOT_SECOND- See Also:
-
MOCK_OUTPUT
private static final net.minecraft.world.item.ItemStack MOCK_OUTPUT
-
-
Constructor Details
-
AnvilUpdateEventTests
public AnvilUpdateEventTests()
-
-
Method Details
-
sampleStack
private static net.minecraft.world.item.ItemStack sampleStack() -
moveItemsToInputs
private static void moveItemsToInputs(net.minecraft.world.inventory.AnvilMenu menu, net.minecraft.world.entity.player.Player player) -
clearInputs
private static void clearInputs(net.minecraft.world.inventory.AnvilMenu menu, net.minecraft.world.entity.player.Player player) -
withAnvil
Common anvil, player and menu setup. -
vanillaCombineTest
-
customOutputAndCostTest
-
cancelClearsOutputTest
-
renameTest
-
leftRemovalResetsOutputTest
-
slotSpecificEventFiringTest
-