This library is used to create custom recipes that use ItemStacks as a requirement instead of just Materials. It allows you to edit name and lore using this.
NOTE: THIS ONLY WORKS IN WORKBENCH INVENTORIES CURRENTLY
CShapedRecipe Example:
List<String> recipe = Arrays.asList("xxx", "xox", "xxx");
HashMap<ItemStack, Character> chars = new HashMap<>();
ItemStack item = new ItemStack(Material.STONE, 1);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName("HELLO");
item.setItemMeta(meta);
chars.put(item, 'x');
chars.put(new ItemStack(Material.AIR), 'o');
ItemStack result = new ItemStack(Material.DIAMOND, 10);
facemywrath.srlib.main.CustomRecipeLib.registerCustomRecipe(new CShapedRecipe(recipe, chars, result));
CShapelessRecipe Example:
ItemStack item = new ItemStack(Material.STONE, 1);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName("HELLO");
item.setItemMeta(meta);
ItemStack result = new ItemStack(Material.DIAMOND, 10);
HashMap<ItemStack, Integer> shapeless = new HashMap<>();
shapeless.put(item, 4);
facemywrath.srlib.main.CustomRecipeLib.registerCustomRecipe(new CShapelessRecipe(shapeless, result));
The integer value for the hashmap is the number of slots which will have that item in it.
I also added a RecipeFoundEvent for when it finds a custom recipe
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta