Class AlphabeticalItemGroupFiller
java.lang.Object
io.github.vampirestudios.vampirelib.api.AlphabeticalItemGroupFiller
- All Implemented Interfaces:
ItemGroupFiller
Implementation class of
ItemGroupFiller for filling Items alphabetically.
shouldInclude is used to test what items should be considered when inserting an item at its alphabetical position.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAlphabeticalItemGroupFiller(Predicate<net.minecraft.world.item.Item> shouldInclude) -
Method Summary
Modifier and TypeMethodDescriptionvoidfillItem(net.minecraft.world.item.Item item, net.minecraft.world.item.CreativeModeTab group, net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> items) Fills anItemfor aCreativeModeTabgiven aNonNullListof theItemStacks for thatCreativeModeTab.static <I extends net.minecraft.world.item.Item>
AlphabeticalItemGroupFillerCreates anAlphabeticalItemGroupFillerthat fills items alphabetically for items that are an instance of a class.
-
Constructor Details
-
AlphabeticalItemGroupFiller
-
-
Method Details
-
forClass
public static <I extends net.minecraft.world.item.Item> AlphabeticalItemGroupFiller forClass(Class<I> clazz) Creates anAlphabeticalItemGroupFillerthat fills items alphabetically for items that are an instance of a class. (e.g. Having a modded spawn egg filled alphabetically into the vanilla's spawn eggs)- Type Parameters:
I- The type of the class, must extendItem.- Parameters:
clazz- The class to test for.- Returns:
- An
AlphabeticalItemGroupFillerthat fills items alphabetically for items that are an instance of a class. (e.g. Having a modded spawn egg filled alphabetically into the vanilla's spawn eggs)
-
fillItem
public void fillItem(net.minecraft.world.item.Item item, net.minecraft.world.item.CreativeModeTab group, net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> items) Description copied from interface:ItemGroupFillerFills anItemfor aCreativeModeTabgiven aNonNullListof theItemStacks for thatCreativeModeTab.- Specified by:
fillItemin interfaceItemGroupFiller- Parameters:
item- TheItemto fill.group- TheCreativeModeTabto fill into.items- ANonNullListof theItemStacks for theCreativeModeTab.
-