Package net.anawesomguy.wsmlmb.util
Class WSMLMBUtil
java.lang.Object
net.anawesomguy.wsmlmb.util.WSMLMBUtil
This class contains some utility methods used in the library.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddToGroup(Object itemGroup, net.minecraft.item.ItemConvertible... items) Adds items to an item group (creative tab).static voidaddToGroup(Object itemGroup, net.minecraft.item.ItemStack... items) Adds items to an item group (creative tab).static ObjectgetItemGroup(String name) static net.fabricmc.fabric.api.event.Event<net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents.ModifyEntries>getModifyEntriesEvent(Object itemGroup) static net.minecraft.text.MutableTexttoTranslatable(String langKey) Creates a translatable text out of the given language key.
-
Method Details
-
toTranslatable
Creates a translatable text out of the given language key.This is used for support between different versions.
- Parameters:
langKey- the language key to create a translatable text out of.- Returns:
- a translatable text representing the given
langKey.
-
addToGroup
Adds items to an item group (creative tab).This is used for support between different versions.
- Parameters:
itemGroup- the group of the item you want to add the item to. Must be of the correct type for your Minecraft version, or a string for the name of theItemGroupsfield you want to add it to.items- the items to add to the group.
-
addToGroup
Adds items to an item group (creative tab).This is used for support between different versions.
- Parameters:
itemGroup- the group of the item you want to add the item to. Must be of the correct type for your Minecraft version, a string for the name of theItemGroupsfield you want to add it to, or anIdentifier.items- the items to add to the group.
-
getModifyEntriesEvent
public static net.fabricmc.fabric.api.event.Event<net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents.ModifyEntries> getModifyEntriesEvent(Object itemGroup) -
getItemGroup
-