public class BookshelfRegistry
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
BookshelfRegistry.AnvilRecipe |
| Modifier and Type | Field and Description |
|---|---|
static com.google.common.collect.BiMap<java.lang.String,Buff> |
buffMap
A BiMap which stores every single Buff effect that has been registered.
|
static java.util.HashMap<net.minecraft.item.ItemStack,java.util.ArrayList<java.lang.String>> |
infoMap
A HashMap that contains a list of descriptions for ingame items.
|
| Constructor and Description |
|---|
BookshelfRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAnvilRecipe(BookshelfRegistry.AnvilRecipe recipe) |
static void |
addAnvilRecipe(net.minecraft.item.ItemStack inputLeft,
net.minecraft.item.ItemStack inputRight,
int experience,
net.minecraft.item.ItemStack output)
Adds a new AnvilRecipe to the registry.
|
static void |
addAnvilRecipe(net.minecraft.item.ItemStack inputLeft,
net.minecraft.item.ItemStack inputRight,
java.lang.String requiredName,
int experience,
int materialCost,
net.minecraft.item.ItemStack output)
Adds a new AnvilRecipe to the registry.
|
static void |
addAnvilRecipe(net.minecraft.item.ItemStack inputLeft,
net.minecraft.item.ItemStack inputRight,
java.lang.String requiredName,
int experience,
net.minecraft.item.ItemStack output)
Adds a new AnvilRecipe to the registry.
|
static void |
addInformation(net.minecraft.block.Block block)
Registers a Block into the information system.
|
static void |
addInformation(net.minecraft.block.Block block,
java.lang.String localizationKey)
Registers a localization key to a Block.
|
static void |
addInformation(net.minecraft.item.Item item)
Registers an Item into the information system.
|
static void |
addInformation(net.minecraft.item.ItemStack stack,
java.lang.String localizationKey)
Registers a localization key to an ItemStack.
|
static void |
addInformation(net.minecraft.item.Item item,
java.lang.String localizationKey)
Registers a localization key to an Item.
|
static boolean |
doesStackHaveDescription(net.minecraft.item.ItemStack stack)
Checks to see if an ItemStack has any information registered.
|
static java.util.List<BookshelfRegistry.AnvilRecipe> |
getAnvilRecipes()
Retrieves the List of all registered anvil recipes.
|
static Buff |
getBuffFromString(java.lang.String name)
Attempts to retrieve a Buff by its name.
|
static java.util.ArrayList<java.lang.String> |
getDescriptionKeys(net.minecraft.item.ItemStack stack)
Retrieves a list of description translation keys for an ItemStack.
|
static void |
registerBuff(Buff buff)
Registers a Buff with the buffMap.
|
public static com.google.common.collect.BiMap<java.lang.String,Buff> buffMap
public static java.util.HashMap<net.minecraft.item.ItemStack,java.util.ArrayList<java.lang.String>> infoMap
public static void addAnvilRecipe(net.minecraft.item.ItemStack inputLeft,
net.minecraft.item.ItemStack inputRight,
int experience,
net.minecraft.item.ItemStack output)
inputLeft: - The ItemStack required in the left slot of the Anvil GUI.inputRight: - The ItemStack required in the right slot.experience: - The amount of experience levels this recipe will cost. Must be at
least one for this to work.output: - The ItemStack to be created by the recipe.public static void addAnvilRecipe(net.minecraft.item.ItemStack inputLeft,
net.minecraft.item.ItemStack inputRight,
java.lang.String requiredName,
int experience,
net.minecraft.item.ItemStack output)
inputLeft: - The ItemStack required in the left slot of the Anvil GUI.inputRight: - The ItemStack required in the left slot of the Anvil GUI.requiredName: - A name requirement for this recipe to complete.experience: - The amount of experience levels this recipe will cost. Must be at
least one for this to work.output: - The ItemStack to be created by this recipe.public static void addAnvilRecipe(net.minecraft.item.ItemStack inputLeft,
net.minecraft.item.ItemStack inputRight,
java.lang.String requiredName,
int experience,
int materialCost,
net.minecraft.item.ItemStack output)
inputLeft: - The ItemStack required in the left slot of the Anvil GUI.inputRight: - The ItemStack required in the left slot of the Anvil GUI.requiredName: - A name requirement for this recipe to complete.experience: - The amount of experience levels this recipe will cost. Must be at
least one for this to work.materialCost: - The amount of items to consume from the right side of the Anvil
GUI. If 0, all will be used.output: - The ItemStack to be created by this recipe.public void addAnvilRecipe(BookshelfRegistry.AnvilRecipe recipe)
public static java.util.List<BookshelfRegistry.AnvilRecipe> getAnvilRecipes()
public static Buff getBuffFromString(java.lang.String name)
name: - The name of the buff you are looking for.public static void registerBuff(Buff buff)
buff: - The Buff to register.public static void addInformation(net.minecraft.item.Item item)
item: - The Item to add the information for.public static void addInformation(net.minecraft.item.Item item,
java.lang.String localizationKey)
item: - The Item to add information for.localozationKey: - The localization key used to retrieve the information.public static void addInformation(net.minecraft.block.Block block)
block: - The Block to add the information for.public static void addInformation(net.minecraft.block.Block block,
java.lang.String localizationKey)
Block: - The Block to add information for.localozationKey: - The localization key used to retrieve the information.public static void addInformation(net.minecraft.item.ItemStack stack,
java.lang.String localizationKey)
stack: - The ItemStack to add information for.localozationKey: - The localization key used to retrieve the information.public static boolean doesStackHaveDescription(net.minecraft.item.ItemStack stack)
stack: - The ItemStack to check for.public static java.util.ArrayList<java.lang.String> getDescriptionKeys(net.minecraft.item.ItemStack stack)
stack: - The ItemStack to grab keys for.