Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nonopichy/customrecipe
With ITEMS CUSTOM in RECIPE!
https://github.com/nonopichy/customrecipe
api basic bukkit bukkit-plugin easy minecraft minecraft-plugin plugin short spigot
Last synced: about 1 month ago
JSON representation
With ITEMS CUSTOM in RECIPE!
- Host: GitHub
- URL: https://github.com/nonopichy/customrecipe
- Owner: Nonopichy
- License: apache-2.0
- Created: 2021-11-14T23:45:22.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-01T22:54:23.000Z (almost 3 years ago)
- Last Synced: 2023-03-08T07:39:50.860Z (almost 2 years ago)
- Topics: api, basic, bukkit, bukkit-plugin, easy, minecraft, minecraft-plugin, plugin, short, spigot
- Language: Java
- Homepage:
- Size: 8.99 MB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![download](https://img.shields.io/badge/download-java-green)](https://github.com/Nonopichy/CustomRecipe/releases/)
[![b](https://img.shields.io/badge/bstats-web%20-green)](https://bstats.org/plugin/bukkit/CustomRecipe/13372/)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/59c6e66b3ed44870b1077b7732e4d770)](https://www.codacy.com/gh/Nonopichy/CustomRecipe/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Nonopichy/CustomRecipe&utm_campaign=Badge_Grade)
![a](https://user-images.githubusercontent.com/68911691/141825718-07df0c81-1de8-42c7-92fc-f13ba54bef96.png)# FrameWork
- Version Support: **1.13.2** Below
- Frameworks: Bukkit, Lombok## Craft with custom items
>## Only specific items to craft
>## Tutorial
- Add [CustomRecipe.jar](https://github.com/Nonopichy/CustomRecipe/releases/) in libraries (how you add bukkit)
- In artifacts (without the CustomRecipe in folder plugins)
>
- In artifacts (with the CustomRecipe in folder plugins)
>
- In plugin.yml (with the CustomRecipe in folder plugins)
>
- Create a new instance of 'CustomRecipe' in your JavaPlugin (Main).
- Create a new instance of 'Recipe' add to 'CustomRecipe'.
- Execute method 'addRecipe' with the arguments.
- Compile your plugin with CustomRecipe.jar inside.
- :) Finish! Example? BELOW!## In Main
```java
public class Main extends JavaPlugin {
public static CustomRecipe customRecipe;
public void onEnable(){
customRecipe = new CustomRecipe(this);
}
}
```## Example Short
- To empty spaces, use ```null``` instead ```new MatrixItem(new ItemStack(Material.AIR),SLOT)```
```java
Recipe recipe = new Recipe();
recipe.setLoose(false);
recipe.setResult(new ItemStack(Material.DIAMOND));
final ItemStack REDSTONE = new ItemStack(Material.REDSTONE);
recipe.setRecipe(
new MatrixItem(REDSTONE, 0),
null,
new MatrixItem(REDSTONE, 2),
null,
new MatrixItem(REDSTONE, 4)
);
customRecipe.addRecipe("REDSTONE_TO_DIAMOND", recipe);
```>
## Example "Bigger"
```java
Recipe recipe = new Recipe();
recipe.setLoose(false);
recipe.setResult(result);
recipe.setRecipe(
new MatrixItem(red, 0),
new MatrixItem(red, 1),
new MatrixItem(red, 2),
new MatrixItem(red, 3),
new MatrixItem(new ItemStack(Material.APPLE), 4),
new MatrixItem(red, 5),
new MatrixItem(red, 6),
new MatrixItem(red, 7),
new MatrixItem(red, 8)
);
customRecipe.addRecipe("APPLE_REDSTONE", recipe);
```## Items used
```java
// Item Result
ItemStack result = new ItemStack(Material.APPLE);
ItemMeta itemMeta = result.getItemMeta();
itemMeta.setDisplayName("§cMaça de Redstone");
result.addUnsafeEnchantment(Enchantment.LUCK,1);
itemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
result.setItemMeta(itemMeta);// Item Craft
ItemStack redstone = new ItemStack(Material.REDSTONE);
itemMeta = red.getItemMeta();
itemMeta.setDisplayName("§c§lRedstone");
redstone.addUnsafeEnchantment(Enchantment.LUCK,1);
itemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
redstone.setItemMeta(itemMeta);
```## Result
>