[ci skip] spotlessApply with the new settings

This commit is contained in:
Jason Mitchell committed 2023-01-28 17:55:51 -08:00
1 parent f1dea5460a
commit f106b5e766
172 files changed
+2552 -2088

No files matched your search

+62 -39
View File
@@ -1,5 +1,17 @@
package codechicken.nei.api;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import org.lwjgl.input.Keyboard;
import codechicken.nei.ItemList;
import codechicken.nei.ItemSorter;
import codechicken.nei.ItemStackSet;
@@ -24,23 +36,15 @@ import codechicken.nei.recipe.IUsageHandler;
import codechicken.nei.recipe.RecipeCatalysts;
import codechicken.nei.recipe.RecipeInfo;
import codechicken.nei.recipe.StackInfo;
import com.google.common.collect.Sets;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import org.lwjgl.input.Keyboard;
/**
* This is the main class that handles item property configuration.
* WARNING: DO NOT access this class until the world has been loaded
* These methods should be called from INEIConfig implementors
* This is the main class that handles item property configuration. WARNING: DO NOT access this class until the world
* has been loaded These methods should be called from INEIConfig implementors
*/
public class API {
/**
* Register a new Crafting Recipe handler;
*
@@ -63,8 +67,7 @@ public class API {
* Add a gui to the default overlay renderer with the default position
*
* @param classz The class of your gui
* @param ident The identification string, currently
* {crafting, crafting2x2, smelting, fuel, brewing}
* @param ident The identification string, currently {crafting, crafting2x2, smelting, fuel, brewing}
*/
public static void registerGuiOverlay(Class<? extends GuiContainer> classz, String ident) {
registerGuiOverlay(classz, ident, 5, 11);
@@ -74,8 +77,7 @@ public class API {
* Add a gui to the default overlay renderer with an offset
*
* @param classz The class of your gui
* @param ident The identification string, currently
* {crafting, crafting2x2, smelting, fuel, brewing}
* @param ident The identification string, currently {crafting, crafting2x2, smelting, fuel, brewing}
* @param x x-offset
* @param y y-offset
*/
@@ -87,12 +89,11 @@ public class API {
* Add a gui to the default overlay renderer
*
* @param classz The class of your gui
* @param ident The identification string, currently
* {crafting, crafting2x2, smelting, fuel, brewing}
* @param ident The identification string, currently {crafting, crafting2x2, smelting, fuel, brewing}
* @param positioner A Stack Repositioner for moving the items to the right place
*/
public static void registerGuiOverlay(
Class<? extends GuiContainer> classz, String ident, IStackPositioner positioner) {
public static void registerGuiOverlay(Class<? extends GuiContainer> classz, String ident,
IStackPositioner positioner) {
RecipeInfo.registerGuiOverlay(classz, ident, positioner);
}
@@ -101,13 +102,14 @@ public class API {
* @param handler The handler to register
* @param ident The recipe identification string
*/
public static void registerGuiOverlayHandler(
Class<? extends GuiContainer> classz, IOverlayHandler handler, String ident) {
public static void registerGuiOverlayHandler(Class<? extends GuiContainer> classz, IOverlayHandler handler,
String ident) {
RecipeInfo.registerOverlayHandler(classz, handler, ident);
}
/**
* Set the offset to be added to items to translate them into recipe coords on the actual gui, default is 5, 11. Primarily RecipeTransferRects
* Set the offset to be added to items to translate them into recipe coords on the actual gui, default is 5, 11.
* Primarily RecipeTransferRects
*
* @param classz The class of your gui
* @param x
@@ -127,8 +129,8 @@ public class API {
}
/**
* Hide an item from the item panel
* Damage values of OreDictionary.WILDCARD_VALUE and ItemStackMap.WILDCARD_TAG tags function as wildcards for their respective variables
* Hide an item from the item panel Damage values of OreDictionary.WILDCARD_VALUE and ItemStackMap.WILDCARD_TAG tags
* function as wildcards for their respective variables
*/
public static void hideItem(ItemStack item) {
if (!ItemInfo.hiddenItems.contains(item)) {
@@ -149,6 +151,7 @@ public class API {
/**
* Adds an item to the item panel. Any items added using this function will override the default search pattern.
*
* @param item an item with data
*/
public static void addItemListEntry(ItemStack item) {
@@ -171,6 +174,7 @@ public class API {
/**
* Add a custom KeyBinding to be configured in the Controls menu.
*
* @param ident An identifier for your key, eg "shoot"
* @param defaultKey The default value, commonly obtained from {@link Keyboard}
*/
@@ -182,6 +186,7 @@ public class API {
/**
* Add a custom KeyBinding to be configured in the Controls menu.
*
* @param ident An identifier for your key, eg "shoot"
* @param defaultKey The default value, commonly obtained from {@link Keyboard}
*/
@@ -196,6 +201,7 @@ public class API {
/**
* Add a new Layout Style for the NEI interface
*
* @param styleID The Unique ID to be used for storing your style in the config and cycling through avaliable styles
* @param style The style to add.
*/
@@ -205,6 +211,7 @@ public class API {
/**
* Registers a new Infinite Item Handler.
*
* @param handler The handler to be registered.
*/
public static void addInfiniteItemHandler(IInfiniteItemHandler handler) {
@@ -213,6 +220,7 @@ public class API {
/**
* Registers a new Infinite Item Handler.
*
* @param block The block to handle, null for all.
* @param handler The handler to be registered.
*/
@@ -222,6 +230,7 @@ public class API {
/**
* Tells NEI not to perform any Fast Transfer operations on slots of a particular class
*
* @param slotClass The class of slot to be exempted
*/
public static void addFastTransferExemptSlot(Class<? extends Slot> slotClass) {
@@ -230,8 +239,10 @@ public class API {
/**
* Register a new text handler for the block highlight tooltip with a layout specification (HEADER, BODY or FOOTER).
*
* @param handler The handler to be registered.
* @param layout A HUDAugmenterRegistry.Layout entry. HEADER is displayed before BODY which is displayed before FOOTER.
* @param layout A HUDAugmenterRegistry.Layout entry. HEADER is displayed before BODY which is displayed before
* FOOTER.
*/
public static void registerHighlightHandler(IHighlightHandler handler, ItemInfo.Layout... layout) {
ItemInfo.registerHighlightHandler(handler, layout);
@@ -239,6 +250,7 @@ public class API {
/**
* Register a mode handler for overriding NEI recipe/utility/cheat mode settings.
*
* @param handler The handler to be registered.
*/
public static void registerModeHandler(INEIModeHandler handler) {
@@ -247,6 +259,7 @@ public class API {
/**
* Register a filter provider for the item panel.
*
* @param filterProvider The filter provider to be registered.
*/
public static void addItemFilter(ItemFilterProvider filterProvider) {
@@ -257,7 +270,8 @@ public class API {
/**
* Adds a new tag to the item subset dropdown.
* @param name The fully qualified name, Eg Blocks.MobSpawners. NOT case sensitive
*
* @param name The fully qualified name, Eg Blocks.MobSpawners. NOT case sensitive
* @param filter A filter for matching items that fit in this subset
*/
public static void addSubset(String name, ItemFilter filter) {
@@ -266,7 +280,8 @@ public class API {
/**
* Adds a new tag to the item subset dropdown.
* @param name The fully qualified name, Eg Blocks.MobSpawners. NOT case sensitive
*
* @param name The fully qualified name, Eg Blocks.MobSpawners. NOT case sensitive
* @param items An iterable of itemstacks to be added as a subset
*/
public static void addSubset(String name, Iterable<ItemStack> items) {
@@ -291,15 +306,19 @@ public class API {
/**
* Adds a new sorting option to the item panel sort menu
* @param name A unique id for this sort option. Will be used in the config for saving and translated in the options gui. Note that if the translation key name.tip exists, it will be used for a tooltip
*
* @param name A unique id for this sort option. Will be used in the config for saving and translated in the options
* gui. Note that if the translation key name.tip exists, it will be used for a tooltip
*/
public static void addSortOption(String name, Comparator<ItemStack> comparator) {
ItemSorter.add(name, comparator);
}
/**
* Adds an additional item list entry for an item, sorted after the rest of the items are found through the normal process
* @param item The item to add the variant for
* Adds an additional item list entry for an item, sorted after the rest of the items are found through the normal
* process
*
* @param item The item to add the variant for
* @param variant The stack to appear in the item panel
*/
public static void addItemVariant(Item item, ItemStack variant) {
@@ -314,10 +333,12 @@ public class API {
}
/**
* Adds an association between an ingredient and what it can craft. (i.e. Furnace ItemStack -> Smelting and Fuel Recipes)
* Allows players to see what ingredient they need to craft in order to make recipes from a recipe category.
* @param stack the ingredient that can craft recipes (like a furnace or crafting table)
* @param handler the recipe category handled by the ingredient
* Adds an association between an ingredient and what it can craft. (i.e. Furnace ItemStack -> Smelting and Fuel
* Recipes) Allows players to see what ingredient they need to craft in order to make recipes from a recipe
* category.
*
* @param stack the ingredient that can craft recipes (like a furnace or crafting table)
* @param handler the recipe category handled by the ingredient
* @param priority higher priority comes first, default to 0
*/
public static void addRecipeCatalyst(ItemStack stack, IRecipeHandler handler, int priority) {
@@ -333,11 +354,13 @@ public class API {
}
/**
* Adds an association between an ingredient and what it can craft. (i.e. Furnace ItemStack -> Smelting and Fuel Recipes)
* Allows players to see what ingredient they need to craft in order to make recipes from a recipe category.
* @param stack the ingredient that can craft recipes (like a furnace or crafting table)
* Adds an association between an ingredient and what it can craft. (i.e. Furnace ItemStack -> Smelting and Fuel
* Recipes) Allows players to see what ingredient they need to craft in order to make recipes from a recipe
* category.
*
* @param stack the ingredient that can craft recipes (like a furnace or crafting table)
* @param handlerID recipe category identifier (see also {@link RecipeCatalysts#getRecipeID(IRecipeHandler)})
* @param priority higher priority comes first, default to 0
* @param priority higher priority comes first, default to 0
*/
public static void addRecipeCatalyst(ItemStack stack, String handlerID, int priority) {
RecipeCatalysts.addRecipeCatalyst(handlerID, new CatalystInfo(stack, priority));