mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Merge pull request #3363 from qwertyuioplkjhgfd/register-filled-flask
Register filled flask as a Slimefun Item
This commit is contained in:
commit
fd00771222
@ -56,6 +56,7 @@ public class RecipeType implements Keyed {
|
|||||||
|
|
||||||
public static final RecipeType MOB_DROP = new RecipeType(new NamespacedKey(Slimefun.instance(), "mob_drop"), new CustomItemStack(Material.IRON_SWORD, "&bMob Drop"), RecipeType::registerMobDrop, "", "&rKill the specified Mob to obtain this Item");
|
public static final RecipeType MOB_DROP = new RecipeType(new NamespacedKey(Slimefun.instance(), "mob_drop"), new CustomItemStack(Material.IRON_SWORD, "&bMob Drop"), RecipeType::registerMobDrop, "", "&rKill the specified Mob to obtain this Item");
|
||||||
public static final RecipeType BARTER_DROP = new RecipeType(new NamespacedKey(Slimefun.instance(), "barter_drop"), new CustomItemStack(Material.GOLD_INGOT, "&bBarter Drop"), RecipeType::registerBarterDrop, "&aBarter with piglins for a chance", "&ato obtain this item");
|
public static final RecipeType BARTER_DROP = new RecipeType(new NamespacedKey(Slimefun.instance(), "barter_drop"), new CustomItemStack(Material.GOLD_INGOT, "&bBarter Drop"), RecipeType::registerBarterDrop, "&aBarter with piglins for a chance", "&ato obtain this item");
|
||||||
|
public static final RecipeType INTERACT = new RecipeType(new NamespacedKey(Slimefun.instance(), "interact"), new CustomItemStack(Material.PLAYER_HEAD, "&bInteract", "", "&a&oRight click with this item"));
|
||||||
|
|
||||||
public static final RecipeType HEATED_PRESSURE_CHAMBER = new RecipeType(new NamespacedKey(Slimefun.instance(), "heated_pressure_chamber"), SlimefunItems.HEATED_PRESSURE_CHAMBER);
|
public static final RecipeType HEATED_PRESSURE_CHAMBER = new RecipeType(new NamespacedKey(Slimefun.instance(), "heated_pressure_chamber"), SlimefunItems.HEATED_PRESSURE_CHAMBER);
|
||||||
public static final RecipeType FOOD_FABRICATOR = new RecipeType(new NamespacedKey(Slimefun.instance(), "food_fabricator"), SlimefunItems.FOOD_FABRICATOR);
|
public static final RecipeType FOOD_FABRICATOR = new RecipeType(new NamespacedKey(Slimefun.instance(), "food_fabricator"), SlimefunItems.FOOD_FABRICATOR);
|
||||||
|
@ -0,0 +1,27 @@
|
|||||||
|
package io.github.thebusybiscuit.slimefun4.implementation.items;
|
||||||
|
|
||||||
|
import javax.annotation.ParametersAreNonnullByDefault;
|
||||||
|
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
|
||||||
|
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
|
||||||
|
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
|
||||||
|
import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType;
|
||||||
|
import io.github.thebusybiscuit.slimefun4.core.attributes.NotConfigurable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The {@link HiddenItem} is a {@link NotConfigurable} {@link SlimefunItem}
|
||||||
|
* that is hidden from the Slimefun guide.
|
||||||
|
*
|
||||||
|
* @author char321
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class HiddenItem extends SlimefunItem implements NotConfigurable {
|
||||||
|
|
||||||
|
@ParametersAreNonnullByDefault
|
||||||
|
public HiddenItem(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
|
||||||
|
super(itemGroup, item, recipeType, recipe);
|
||||||
|
this.setHidden(true);
|
||||||
|
}
|
||||||
|
}
|
@ -26,6 +26,7 @@ import io.github.thebusybiscuit.slimefun4.core.attributes.Radioactivity;
|
|||||||
import io.github.thebusybiscuit.slimefun4.core.handlers.RainbowTickHandler;
|
import io.github.thebusybiscuit.slimefun4.core.handlers.RainbowTickHandler;
|
||||||
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
|
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
|
||||||
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
|
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
|
||||||
|
import io.github.thebusybiscuit.slimefun4.implementation.items.HiddenItem;
|
||||||
import io.github.thebusybiscuit.slimefun4.implementation.items.RadioactiveItem;
|
import io.github.thebusybiscuit.slimefun4.implementation.items.RadioactiveItem;
|
||||||
import io.github.thebusybiscuit.slimefun4.implementation.items.VanillaItem;
|
import io.github.thebusybiscuit.slimefun4.implementation.items.VanillaItem;
|
||||||
import io.github.thebusybiscuit.slimefun4.implementation.items.altar.AncientAltar;
|
import io.github.thebusybiscuit.slimefun4.implementation.items.altar.AncientAltar;
|
||||||
@ -1371,6 +1372,10 @@ public final class SlimefunItemSetup {
|
|||||||
new SlimefunItemStack(SlimefunItems.FLASK_OF_KNOWLEDGE, 8))
|
new SlimefunItemStack(SlimefunItems.FLASK_OF_KNOWLEDGE, 8))
|
||||||
.register(plugin);
|
.register(plugin);
|
||||||
|
|
||||||
|
new HiddenItem(itemGroups.magicalGadgets, SlimefunItems.FILLED_FLASK_OF_KNOWLEDGE, RecipeType.INTERACT,
|
||||||
|
new ItemStack[] {SlimefunItems.FLASK_OF_KNOWLEDGE, null, null, null, null, null, null, null, null})
|
||||||
|
.register(plugin);
|
||||||
|
|
||||||
new BirthdayCake(itemGroups.birthday, new SlimefunItemStack("BIRTHDAY_CAKE", Material.CAKE, "&bBirthday Cake"), RecipeType.ENHANCED_CRAFTING_TABLE,
|
new BirthdayCake(itemGroups.birthday, new SlimefunItemStack("BIRTHDAY_CAKE", Material.CAKE, "&bBirthday Cake"), RecipeType.ENHANCED_CRAFTING_TABLE,
|
||||||
new ItemStack[] {null, new ItemStack(Material.TORCH), null, new ItemStack(Material.SUGAR), new ItemStack(Material.CAKE), new ItemStack(Material.SUGAR), null, null, null})
|
new ItemStack[] {null, new ItemStack(Material.TORCH), null, new ItemStack(Material.SUGAR), new ItemStack(Material.CAKE), new ItemStack(Material.SUGAR), null, null, null})
|
||||||
.register(plugin);
|
.register(plugin);
|
||||||
@ -2606,7 +2611,7 @@ public final class SlimefunItemSetup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (minecraftVersion.isAtLeast(MinecraftVersion.MINECRAFT_1_16)) {
|
if (minecraftVersion.isAtLeast(MinecraftVersion.MINECRAFT_1_16)) {
|
||||||
new VillagerRune(itemGroups.magicalResources, SlimefunItems.VILLAGER_RUNE, RecipeType.ANCIENT_ALTAR,
|
new VillagerRune(itemGroups.magicalResources, SlimefunItems.VILLAGER_RUNE, RecipeType.ANCIENT_ALTAR,
|
||||||
new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, SlimefunItems.MAGICAL_GLASS, new ItemStack(Material.CRYING_OBSIDIAN), SlimefunItems.STRANGE_NETHER_GOO, SlimefunItems.FIRE_RUNE, SlimefunItems.STRANGE_NETHER_GOO, new ItemStack(Material.CRYING_OBSIDIAN), SlimefunItems.MAGICAL_GLASS, SlimefunItems.MAGIC_LUMP_3},
|
new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, SlimefunItems.MAGICAL_GLASS, new ItemStack(Material.CRYING_OBSIDIAN), SlimefunItems.STRANGE_NETHER_GOO, SlimefunItems.FIRE_RUNE, SlimefunItems.STRANGE_NETHER_GOO, new ItemStack(Material.CRYING_OBSIDIAN), SlimefunItems.MAGICAL_GLASS, SlimefunItems.MAGIC_LUMP_3},
|
||||||
new SlimefunItemStack(SlimefunItems.VILLAGER_RUNE, 3))
|
new SlimefunItemStack(SlimefunItems.VILLAGER_RUNE, 3))
|
||||||
.register(plugin);
|
.register(plugin);
|
||||||
|
Loading…
Reference in New Issue
Block a user