1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 11:45:51 +00:00

Relocated SlimefunItem.java

This commit is contained in:
TheBusyBiscuit 2021-06-26 15:56:34 +02:00
parent 0dd1356630
commit f6890f4c49
374 changed files with 884 additions and 883 deletions

View File

@ -21,10 +21,11 @@ import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetProvider; import io.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetProvider;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.papermc.lib.PaperLib; import io.papermc.lib.PaperLib;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker; import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker;
import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.BlockStorage;

View File

@ -10,7 +10,7 @@ import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
/** /**
* This is a very basic interface that will be used to identify * This is a very basic interface that will be used to identify

View File

@ -11,8 +11,8 @@ import org.bukkit.event.HandlerList;
import org.bukkit.event.block.BlockEvent; import org.bukkit.event.block.BlockEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.BlockPlacer; import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.BlockPlacer;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This {@link Event} is fired whenever a {@link BlockPlacer} wants to place a {@link Block}. * This {@link Event} is fired whenever a {@link BlockPlacer} wants to place a {@link Block}.

View File

@ -9,10 +9,10 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.Event; import org.bukkit.event.Event;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.core.researching.Research; import io.github.thebusybiscuit.slimefun4.core.researching.Research;
import io.github.thebusybiscuit.slimefun4.implementation.guide.CheatSheetSlimefunGuide; import io.github.thebusybiscuit.slimefun4.implementation.guide.CheatSheetSlimefunGuide;
import io.github.thebusybiscuit.slimefun4.implementation.guide.SurvivalSlimefunGuide; import io.github.thebusybiscuit.slimefun4.implementation.guide.SurvivalSlimefunGuide;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This {@link Event} is called whenever a {@link Player} clicks to unlock a {@link Research}. * This {@link Event} is called whenever a {@link Player} clicks to unlock a {@link Research}.

View File

@ -17,7 +17,8 @@ import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.cscorelib2.data.TriStateOptional; import io.github.thebusybiscuit.cscorelib2.data.TriStateOptional;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.BlockStorage;
/** /**

View File

@ -7,8 +7,8 @@ import org.bukkit.Location;
import org.bukkit.event.Event; import org.bukkit.event.Event;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.items.electric.reactors.Reactor; import io.github.thebusybiscuit.slimefun4.implementation.items.electric.reactors.Reactor;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* The {@link ReactorExplodeEvent} is called whenever a reactor explodes. * The {@link ReactorExplodeEvent} is called whenever a reactor explodes.

View File

@ -2,7 +2,7 @@ package io.github.thebusybiscuit.slimefun4.api.exceptions;
import javax.annotation.ParametersAreNonnullByDefault; import javax.annotation.ParametersAreNonnullByDefault;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
/** /**
* An {@link IdConflictException} is thrown whenever two Addons try to add * An {@link IdConflictException} is thrown whenever two Addons try to add

View File

@ -5,8 +5,8 @@ import javax.annotation.ParametersAreNonnullByDefault;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler; import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.core.handlers.BlockUseHandler; import io.github.thebusybiscuit.slimefun4.core.handlers.BlockUseHandler;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* An {@link IncompatibleItemHandlerException} is thrown whenever a {@link Plugin} tried * An {@link IncompatibleItemHandlerException} is thrown whenever a {@link Plugin} tried

View File

@ -4,7 +4,7 @@ import javax.annotation.ParametersAreNonnullByDefault;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
/** /**
* An {@link UnregisteredItemException} is thrown whenever a {@link Plugin} tried to * An {@link UnregisteredItemException} is thrown whenever a {@link Plugin} tried to

View File

@ -4,9 +4,9 @@ import javax.annotation.ParametersAreNonnullByDefault;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.core.attributes.DamageableItem; import io.github.thebusybiscuit.slimefun4.core.attributes.DamageableItem;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* A {@link WrongItemStackException} is thrown when someone tries to alter an {@link ItemStack} * A {@link WrongItemStackException} is thrown when someone tries to alter an {@link ItemStack}

View File

@ -26,6 +26,7 @@ import io.github.thebusybiscuit.cscorelib2.item.CustomItem;
import io.github.thebusybiscuit.slimefun4.api.events.WaypointCreateEvent; import io.github.thebusybiscuit.slimefun4.api.events.WaypointCreateEvent;
import io.github.thebusybiscuit.slimefun4.api.geo.GEOResource; import io.github.thebusybiscuit.slimefun4.api.geo.GEOResource;
import io.github.thebusybiscuit.slimefun4.api.geo.ResourceManager; import io.github.thebusybiscuit.slimefun4.api.geo.ResourceManager;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile; import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
@ -35,7 +36,6 @@ import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils;
import io.github.thebusybiscuit.slimefun4.utils.HeadTexture; import io.github.thebusybiscuit.slimefun4.utils.HeadTexture;
import io.github.thebusybiscuit.slimefun4.utils.NumberUtils; import io.github.thebusybiscuit.slimefun4.utils.NumberUtils;
import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu; import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.BlockStorage;
/** /**

View File

@ -13,7 +13,6 @@ import org.bukkit.inventory.meta.ItemMeta;
import io.github.thebusybiscuit.slimefun4.implementation.items.armor.SlimefunArmorPiece; import io.github.thebusybiscuit.slimefun4.implementation.items.armor.SlimefunArmorPiece;
import io.github.thebusybiscuit.slimefun4.implementation.tasks.ArmorTask; import io.github.thebusybiscuit.slimefun4.implementation.tasks.ArmorTask;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This class serves as a way of checking whether a {@link Player} has changed their armor * This class serves as a way of checking whether a {@link Player} has changed their armor

View File

@ -1,4 +1,4 @@
package me.mrCookieSlime.Slimefun.Objects; package io.github.thebusybiscuit.slimefun4.api.items;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -25,7 +25,6 @@ import io.github.thebusybiscuit.slimefun4.core.categories.LockedCategory;
import io.github.thebusybiscuit.slimefun4.core.categories.SeasonalCategory; import io.github.thebusybiscuit.slimefun4.core.categories.SeasonalCategory;
import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuide; import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuide;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* Represents a category, which structure multiple {@link SlimefunItem} in the {@link SlimefunGuide}. * Represents a category, which structure multiple {@link SlimefunItem} in the {@link SlimefunGuide}.
@ -36,7 +35,7 @@ import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
* @see SeasonalCategory * @see SeasonalCategory
* *
*/ */
public class Category implements Keyed { public class ItemGroup implements Keyed {
private SlimefunAddon addon; private SlimefunAddon addon;
@ -46,34 +45,34 @@ public class Category implements Keyed {
protected int tier; protected int tier;
/** /**
* Constructs a new {@link Category} with the given {@link NamespacedKey} as an identifier * Constructs a new {@link ItemGroup} with the given {@link NamespacedKey} as an identifier
* and the given {@link ItemStack} as its display item. * and the given {@link ItemStack} as its display item.
* The tier is set to a default value of {@code 3}. * The tier is set to a default value of {@code 3}.
* *
* @param key * @param key
* The {@link NamespacedKey} that is used to identify this {@link Category} * The {@link NamespacedKey} that is used to identify this {@link ItemGroup}
* @param item * @param item
* The {@link ItemStack} that is used to display this {@link Category} * The {@link ItemStack} that is used to display this {@link ItemGroup}
*/ */
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public Category(NamespacedKey key, ItemStack item) { public ItemGroup(NamespacedKey key, ItemStack item) {
this(key, item, 3); this(key, item, 3);
} }
/** /**
* Constructs a new {@link Category} with the given {@link NamespacedKey} as an identifier * Constructs a new {@link ItemGroup} with the given {@link NamespacedKey} as an identifier
* and the given {@link ItemStack} as its display item. * and the given {@link ItemStack} as its display item.
* *
* @param key * @param key
* The {@link NamespacedKey} that is used to identify this {@link Category} * The {@link NamespacedKey} that is used to identify this {@link ItemGroup}
* @param item * @param item
* The {@link ItemStack} that is used to display this {@link Category} * The {@link ItemStack} that is used to display this {@link ItemGroup}
* @param tier * @param tier
* The tier of this {@link Category}, higher tiers will make this {@link Category} appear further down in * The tier of this {@link ItemGroup}, higher tiers will make this {@link ItemGroup} appear further down in
* the {@link SlimefunGuide} * the {@link SlimefunGuide}
*/ */
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public Category(NamespacedKey key, ItemStack item, int tier) { public ItemGroup(NamespacedKey key, ItemStack item, int tier) {
Validate.notNull(key, "A Category's NamespacedKey must not be null!"); Validate.notNull(key, "A Category's NamespacedKey must not be null!");
Validate.notNull(item, "A Category's ItemStack must not be null!"); Validate.notNull(item, "A Category's ItemStack must not be null!");
@ -100,7 +99,7 @@ public class Category implements Keyed {
* By default, a category is automatically registered when a {@link SlimefunItem} was added to it. * By default, a category is automatically registered when a {@link SlimefunItem} was added to it.
* *
* @param addon * @param addon
* The {@link SlimefunAddon} that wants to register this {@link Category} * The {@link SlimefunAddon} that wants to register this {@link ItemGroup}
*/ */
public void register(@Nonnull SlimefunAddon addon) { public void register(@Nonnull SlimefunAddon addon) {
Validate.notNull(addon, "The Addon cannot be null"); Validate.notNull(addon, "The Addon cannot be null");
@ -116,21 +115,21 @@ public class Category implements Keyed {
} }
/** /**
* Returns the tier of this {@link Category}. * Returns the tier of this {@link ItemGroup}.
* The tier determines the position of this {@link Category} in the {@link SlimefunGuide}. * The tier determines the position of this {@link ItemGroup} in the {@link SlimefunGuide}.
* *
* @return the tier of this {@link Category} * @return the tier of this {@link ItemGroup}
*/ */
public int getTier() { public int getTier() {
return tier; return tier;
} }
/** /**
* This sets the tier of this {@link Category}. * This sets the tier of this {@link ItemGroup}.
* The tier determines the position of this {@link Category} in the {@link SlimefunGuide}. * The tier determines the position of this {@link ItemGroup} in the {@link SlimefunGuide}.
* *
* @param tier * @param tier
* The tier for this {@link Category} * The tier for this {@link ItemGroup}
*/ */
public void setTier(int tier) { public void setTier(int tier) {
this.tier = tier; this.tier = tier;
@ -142,15 +141,15 @@ public class Category implements Keyed {
} }
/** /**
* This refreshes the {@link Category} order. * This refreshes the {@link ItemGroup} order.
*/ */
private void sortCategoriesByTier() { private void sortCategoriesByTier() {
List<Category> categories = SlimefunPlugin.getRegistry().getCategories(); List<ItemGroup> categories = SlimefunPlugin.getRegistry().getCategories();
Collections.sort(categories, Comparator.comparingInt(Category::getTier)); Collections.sort(categories, Comparator.comparingInt(ItemGroup::getTier));
} }
/** /**
* This returns the {@link SlimefunAddon} which has registered this {@link Category}. * This returns the {@link SlimefunAddon} which has registered this {@link ItemGroup}.
* Or null if it has not been registered yet. * Or null if it has not been registered yet.
* *
* @return The {@link SlimefunAddon} or null if unregistered * @return The {@link SlimefunAddon} or null if unregistered
@ -161,10 +160,10 @@ public class Category implements Keyed {
} }
/** /**
* Adds the given {@link SlimefunItem} to this {@link Category}. * Adds the given {@link SlimefunItem} to this {@link ItemGroup}.
* *
* @param item * @param item
* the {@link SlimefunItem} that should be added to this {@link Category} * the {@link SlimefunItem} that should be added to this {@link ItemGroup}
*/ */
public void add(@Nonnull SlimefunItem item) { public void add(@Nonnull SlimefunItem item) {
Validate.notNull(item, "Cannot add null Items to a Category!"); Validate.notNull(item, "Cannot add null Items to a Category!");
@ -178,10 +177,10 @@ public class Category implements Keyed {
} }
/** /**
* Removes the given {@link SlimefunItem} from this {@link Category}. * Removes the given {@link SlimefunItem} from this {@link ItemGroup}.
* *
* @param item * @param item
* the {@link SlimefunItem} that should be removed from this {@link Category} * the {@link SlimefunItem} that should be removed from this {@link ItemGroup}
*/ */
public void remove(@Nonnull SlimefunItem item) { public void remove(@Nonnull SlimefunItem item) {
Validate.notNull(item, "Cannot remove null from a Category!"); Validate.notNull(item, "Cannot remove null from a Category!");
@ -189,13 +188,13 @@ public class Category implements Keyed {
} }
/** /**
* This method returns a localized display item of this {@link Category} * This method returns a localized display item of this {@link ItemGroup}
* for the specified {@link Player}. * for the specified {@link Player}.
* *
* @param p * @param p
* The Player to create this {@link ItemStack} for * The Player to create this {@link ItemStack} for
* *
* @return A localized display item for this {@link Category} * @return A localized display item for this {@link ItemGroup}
*/ */
@Nonnull @Nonnull
public ItemStack getItem(@Nonnull Player p) { public ItemStack getItem(@Nonnull Player p) {
@ -218,9 +217,9 @@ public class Category implements Keyed {
/** /**
* This method makes Walshy happy. * This method makes Walshy happy.
* It adds a way to get the name of a {@link Category} without localization nor coloring. * It adds a way to get the name of a {@link ItemGroup} without localization nor coloring.
* *
* @return The unlocalized name of this {@link Category} * @return The unlocalized name of this {@link ItemGroup}
*/ */
@Nonnull @Nonnull
public String getUnlocalizedName() { public String getUnlocalizedName() {
@ -228,13 +227,13 @@ public class Category implements Keyed {
} }
/** /**
* This returns the localized display name of this {@link Category} for the given {@link Player}. * This returns the localized display name of this {@link ItemGroup} for the given {@link Player}.
* The method will fall back to {@link #getUnlocalizedName()} if no translation was found. * The method will fall back to {@link #getUnlocalizedName()} if no translation was found.
* *
* @param p * @param p
* The {@link Player} who to translate the name for * The {@link Player} who to translate the name for
* *
* @return The localized name of this {@link Category} * @return The localized name of this {@link ItemGroup}
*/ */
@Nonnull @Nonnull
public String getDisplayName(@Nonnull Player p) { public String getDisplayName(@Nonnull Player p) {
@ -248,7 +247,7 @@ public class Category implements Keyed {
} }
/** /**
* Returns all instances of {@link SlimefunItem} bound to this {@link Category}. * Returns all instances of {@link SlimefunItem} bound to this {@link ItemGroup}.
* *
* @return the list of SlimefunItems bound to this category * @return the list of SlimefunItems bound to this category
*/ */
@ -258,12 +257,12 @@ public class Category implements Keyed {
} }
/** /**
* This method returns whether a given {@link SlimefunItem} exists in this {@link Category}. * This method returns whether a given {@link SlimefunItem} exists in this {@link ItemGroup}.
* *
* @param item * @param item
* The {@link SlimefunItem} to find * The {@link SlimefunItem} to find
* *
* @return Whether the given {@link SlimefunItem} was found in this {@link Category} * @return Whether the given {@link SlimefunItem} was found in this {@link ItemGroup}
*/ */
public boolean contains(@Nullable SlimefunItem item) { public boolean contains(@Nullable SlimefunItem item) {
return item != null && items.contains(item); return item != null && items.contains(item);
@ -271,8 +270,8 @@ public class Category implements Keyed {
@Override @Override
public final boolean equals(Object obj) { public final boolean equals(Object obj) {
if (obj instanceof Category) { if (obj instanceof ItemGroup) {
return ((Category) obj).getKey().equals(getKey()); return ((ItemGroup) obj).getKey().equals(getKey());
} else { } else {
return false; return false;
} }
@ -289,7 +288,7 @@ public class Category implements Keyed {
} }
/** /**
* This method checks whether this {@link Category} will be hidden for the specified * This method checks whether this {@link ItemGroup} will be hidden for the specified
* {@link Player}. * {@link Player}.
* *
* Categories are hidden if all of their items have been disabled. * Categories are hidden if all of their items have been disabled.
@ -297,7 +296,7 @@ public class Category implements Keyed {
* @param p * @param p
* The {@link Player} to check for * The {@link Player} to check for
* *
* @return Whether this {@link Category} will be hidden to the given {@link Player} * @return Whether this {@link ItemGroup} will be hidden to the given {@link Player}
*/ */
public boolean isHidden(@Nonnull Player p) { public boolean isHidden(@Nonnull Player p) {
for (SlimefunItem slimefunItem : getItems()) { for (SlimefunItem slimefunItem : getItems()) {
@ -310,10 +309,10 @@ public class Category implements Keyed {
} }
/** /**
* This method returns whether this {@link Category} has been registered yet. * This method returns whether this {@link ItemGroup} has been registered yet.
* More specifically: Whether {@link #register(SlimefunAddon)} was called or not. * More specifically: Whether {@link #register(SlimefunAddon)} was called or not.
* *
* @return Whether this {@link Category} has been registered * @return Whether this {@link ItemGroup} has been registered
*/ */
public boolean isRegistered() { public boolean isRegistered() {
return SlimefunPlugin.getRegistry().getCategories().contains(this); return SlimefunPlugin.getRegistry().getCategories().contains(this);

View File

@ -11,7 +11,6 @@ import io.github.thebusybiscuit.slimefun4.core.handlers.EntityInteractHandler;
import io.github.thebusybiscuit.slimefun4.core.handlers.EntityKillHandler; import io.github.thebusybiscuit.slimefun4.core.handlers.EntityKillHandler;
import io.github.thebusybiscuit.slimefun4.core.handlers.ItemConsumptionHandler; import io.github.thebusybiscuit.slimefun4.core.handlers.ItemConsumptionHandler;
import io.github.thebusybiscuit.slimefun4.core.handlers.ItemUseHandler; import io.github.thebusybiscuit.slimefun4.core.handlers.ItemUseHandler;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* An {@link ItemHandler} represents a certain action that a {@link SlimefunItem} * An {@link ItemHandler} represents a certain action that a {@link SlimefunItem}

View File

@ -10,7 +10,6 @@ import org.apache.commons.lang.Validate;
import io.github.thebusybiscuit.cscorelib2.config.Config; import io.github.thebusybiscuit.cscorelib2.config.Config;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This class represents a Setting for a {@link SlimefunItem} that can be modified via * This class represents a Setting for a {@link SlimefunItem} that can be modified via

View File

@ -1,7 +1,6 @@
package io.github.thebusybiscuit.slimefun4.api.items; package io.github.thebusybiscuit.slimefun4.api.items;
import io.github.thebusybiscuit.slimefun4.implementation.items.VanillaItem; import io.github.thebusybiscuit.slimefun4.implementation.items.VanillaItem;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* Defines whether a SlimefunItem is enabled, disabled or fall-back to its vanilla behavior. * Defines whether a SlimefunItem is enabled, disabled or fall-back to its vanilla behavior.

View File

@ -1,4 +1,4 @@
package me.mrCookieSlime.Slimefun.Objects.SlimefunItem; package io.github.thebusybiscuit.slimefun4.api.items;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
@ -32,10 +32,6 @@ import io.github.thebusybiscuit.slimefun4.api.exceptions.IncompatibleItemHandler
import io.github.thebusybiscuit.slimefun4.api.exceptions.MissingDependencyException; import io.github.thebusybiscuit.slimefun4.api.exceptions.MissingDependencyException;
import io.github.thebusybiscuit.slimefun4.api.exceptions.UnregisteredItemException; import io.github.thebusybiscuit.slimefun4.api.exceptions.UnregisteredItemException;
import io.github.thebusybiscuit.slimefun4.api.exceptions.WrongItemStackException; import io.github.thebusybiscuit.slimefun4.api.exceptions.WrongItemStackException;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.ItemSetting;
import io.github.thebusybiscuit.slimefun4.api.items.ItemState;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile; import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile;
import io.github.thebusybiscuit.slimefun4.core.SlimefunRegistry; import io.github.thebusybiscuit.slimefun4.core.SlimefunRegistry;
import io.github.thebusybiscuit.slimefun4.core.attributes.NotConfigurable; import io.github.thebusybiscuit.slimefun4.core.attributes.NotConfigurable;
@ -53,7 +49,6 @@ import io.github.thebusybiscuit.slimefun4.implementation.items.electric.machines
import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils;
import io.github.thebusybiscuit.slimefun4.utils.itemstack.ItemStackWrapper; import io.github.thebusybiscuit.slimefun4.utils.itemstack.ItemStackWrapper;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker; import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker;
/** /**
@ -97,9 +92,9 @@ public class SlimefunItem implements Placeable {
private ItemState state = ItemState.UNREGISTERED; private ItemState state = ItemState.UNREGISTERED;
/** /**
* This is the {@link Category} in which this {@link SlimefunItem} can be found. * This is the {@link ItemGroup} in which this {@link SlimefunItem} can be found.
*/ */
private Category category; private ItemGroup category;
/** /**
* This is a reference to the associated {@link Research}, can be null. * This is a reference to the associated {@link Research}, can be null.
@ -127,7 +122,7 @@ public class SlimefunItem implements Placeable {
* This creates a new {@link SlimefunItem} from the given arguments. * This creates a new {@link SlimefunItem} from the given arguments.
* *
* @param category * @param category
* The {@link Category} this {@link SlimefunItem} belongs to * The {@link ItemGroup} this {@link SlimefunItem} belongs to
* @param item * @param item
* The {@link SlimefunItemStack} that describes the visual features of our {@link SlimefunItem} * The {@link SlimefunItemStack} that describes the visual features of our {@link SlimefunItem}
* @param recipeType * @param recipeType
@ -136,7 +131,7 @@ public class SlimefunItem implements Placeable {
* An Array representing the recipe of this {@link SlimefunItem} * An Array representing the recipe of this {@link SlimefunItem}
*/ */
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public SlimefunItem(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public SlimefunItem(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
this(category, item, recipeType, recipe, null); this(category, item, recipeType, recipe, null);
} }
@ -144,7 +139,7 @@ public class SlimefunItem implements Placeable {
* This creates a new {@link SlimefunItem} from the given arguments. * This creates a new {@link SlimefunItem} from the given arguments.
* *
* @param category * @param category
* The {@link Category} this {@link SlimefunItem} belongs to * The {@link ItemGroup} this {@link SlimefunItem} belongs to
* @param item * @param item
* The {@link SlimefunItemStack} that describes the visual features of our {@link SlimefunItem} * The {@link SlimefunItemStack} that describes the visual features of our {@link SlimefunItem}
* @param recipeType * @param recipeType
@ -155,7 +150,7 @@ public class SlimefunItem implements Placeable {
* The result of crafting this item * The result of crafting this item
*/ */
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public SlimefunItem(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, @Nullable ItemStack recipeOutput) { public SlimefunItem(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, @Nullable ItemStack recipeOutput) {
Validate.notNull(category, "'category' is not allowed to be null!"); Validate.notNull(category, "'category' is not allowed to be null!");
Validate.notNull(item, "'item' is not allowed to be null!"); Validate.notNull(item, "'item' is not allowed to be null!");
Validate.notNull(recipeType, "'recipeType' is not allowed to be null!"); Validate.notNull(recipeType, "'recipeType' is not allowed to be null!");
@ -170,7 +165,7 @@ public class SlimefunItem implements Placeable {
// Previously deprecated constructor, now only for internal purposes // Previously deprecated constructor, now only for internal purposes
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
protected SlimefunItem(Category category, ItemStack item, String id, RecipeType recipeType, ItemStack[] recipe) { protected SlimefunItem(ItemGroup category, ItemStack item, String id, RecipeType recipeType, ItemStack[] recipe) {
Validate.notNull(category, "'category' is not allowed to be null!"); Validate.notNull(category, "'category' is not allowed to be null!");
Validate.notNull(item, "'item' is not allowed to be null!"); Validate.notNull(item, "'item' is not allowed to be null!");
Validate.notNull(id, "'id' is not allowed to be null!"); Validate.notNull(id, "'id' is not allowed to be null!");
@ -216,12 +211,12 @@ public class SlimefunItem implements Placeable {
} }
/** /**
* This returns the {@link Category} of our {@link SlimefunItem}, every {@link SlimefunItem} * This returns the {@link ItemGroup} of our {@link SlimefunItem}, every {@link SlimefunItem}
* is associated with exactly one {@link Category}. * is associated with exactly one {@link ItemGroup}.
* *
* @return The {@link Category} that this {@link SlimefunItem} belongs to * @return The {@link ItemGroup} that this {@link SlimefunItem} belongs to
*/ */
public @Nonnull Category getCategory() { public @Nonnull ItemGroup getCategory() {
return category; return category;
} }
@ -501,7 +496,7 @@ public class SlimefunItem implements Placeable {
* This method is called when this {@link SlimefunItem} is currently being registered * This method is called when this {@link SlimefunItem} is currently being registered
* and we are certain that it will be enabled. * and we are certain that it will be enabled.
* *
* <strong>This method is for internal purposes, like {@link Category} registration only</strong> * <strong>This method is for internal purposes, like {@link ItemGroup} registration only</strong>
*/ */
private final void onEnable() { private final void onEnable() {
// Register the Category too if it hasn't been registered yet // Register the Category too if it hasn't been registered yet
@ -673,12 +668,12 @@ public class SlimefunItem implements Placeable {
} }
/** /**
* This sets the {@link Category} in which this {@link SlimefunItem} will be displayed. * This sets the {@link ItemGroup} in which this {@link SlimefunItem} will be displayed.
* *
* @param category * @param category
* The new {@link Category} * The new {@link ItemGroup}
*/ */
public void setCategory(@Nonnull Category category) { public void setCategory(@Nonnull ItemGroup category) {
Validate.notNull(category, "The Category is not allowed to be null!"); Validate.notNull(category, "The Category is not allowed to be null!");
this.category.remove(this); this.category.remove(this);

View File

@ -32,8 +32,6 @@ import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.utils.HeadTexture; import io.github.thebusybiscuit.slimefun4.utils.HeadTexture;
import io.github.thebusybiscuit.slimefun4.utils.PatternUtils; import io.github.thebusybiscuit.slimefun4.utils.PatternUtils;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* The {@link SlimefunItemStack} functions as the base for any * The {@link SlimefunItemStack} functions as the base for any
* {@link SlimefunItem}. * {@link SlimefunItem}.

View File

@ -6,7 +6,7 @@ import javax.annotation.ParametersAreNonnullByDefault;
import org.apache.commons.lang.Validate; import org.apache.commons.lang.Validate;
import io.github.thebusybiscuit.slimefun4.api.items.ItemSetting; import io.github.thebusybiscuit.slimefun4.api.items.ItemSetting;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
/** /**
* This variation of {@link ItemSetting} allows you to define an {@link Double} range * This variation of {@link ItemSetting} allows you to define an {@link Double} range

View File

@ -7,7 +7,7 @@ import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault; import javax.annotation.ParametersAreNonnullByDefault;
import io.github.thebusybiscuit.slimefun4.api.items.ItemSetting; import io.github.thebusybiscuit.slimefun4.api.items.ItemSetting;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
/** /**
* This variation of {@link ItemSetting} allows you to allow {@link Enum} constants to be * This variation of {@link ItemSetting} allows you to allow {@link Enum} constants to be

View File

@ -6,7 +6,7 @@ import javax.annotation.ParametersAreNonnullByDefault;
import org.apache.commons.lang.Validate; import org.apache.commons.lang.Validate;
import io.github.thebusybiscuit.slimefun4.api.items.ItemSetting; import io.github.thebusybiscuit.slimefun4.api.items.ItemSetting;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
/** /**
* This variation of {@link ItemSetting} allows you to define an {@link Integer} range * This variation of {@link ItemSetting} allows you to define an {@link Integer} range

View File

@ -10,7 +10,7 @@ import org.bukkit.Material;
import org.bukkit.Tag; import org.bukkit.Tag;
import io.github.thebusybiscuit.slimefun4.api.items.ItemSetting; import io.github.thebusybiscuit.slimefun4.api.items.ItemSetting;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
/** /**
* This variation of {@link ItemSetting} allows you to define a default {@link Tag}. * This variation of {@link ItemSetting} allows you to define a default {@link Tag}.

View File

@ -26,7 +26,9 @@ import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.cscorelib2.collections.KeyMap; import io.github.thebusybiscuit.cscorelib2.collections.KeyMap;
import io.github.thebusybiscuit.cscorelib2.config.Config; import io.github.thebusybiscuit.cscorelib2.config.Config;
import io.github.thebusybiscuit.slimefun4.api.geo.GEOResource; import io.github.thebusybiscuit.slimefun4.api.geo.GEOResource;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler; import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile; import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile;
import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuide; import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuide;
import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuideImplementation; import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuideImplementation;
@ -36,8 +38,7 @@ import io.github.thebusybiscuit.slimefun4.core.researching.Research;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.implementation.guide.CheatSheetSlimefunGuide; import io.github.thebusybiscuit.slimefun4.implementation.guide.CheatSheetSlimefunGuide;
import io.github.thebusybiscuit.slimefun4.implementation.guide.SurvivalSlimefunGuide; import io.github.thebusybiscuit.slimefun4.implementation.guide.SurvivalSlimefunGuide;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
import me.mrCookieSlime.Slimefun.api.BlockInfoConfig; import me.mrCookieSlime.Slimefun.api.BlockInfoConfig;
import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset;
@ -56,7 +57,7 @@ public final class SlimefunRegistry {
private final List<SlimefunItem> slimefunItems = new ArrayList<>(); private final List<SlimefunItem> slimefunItems = new ArrayList<>();
private final List<SlimefunItem> enabledItems = new ArrayList<>(); private final List<SlimefunItem> enabledItems = new ArrayList<>();
private final List<Category> categories = new ArrayList<>(); private final List<ItemGroup> categories = new ArrayList<>();
private final List<MultiBlock> multiblocks = new LinkedList<>(); private final List<MultiBlock> multiblocks = new LinkedList<>();
private final List<Research> researches = new LinkedList<>(); private final List<Research> researches = new LinkedList<>();
@ -164,12 +165,12 @@ public final class SlimefunRegistry {
} }
/** /**
* This returns a {@link List} containing every enabled {@link Category}. * This returns a {@link List} containing every enabled {@link ItemGroup}.
* *
* @return {@link List} containing every enabled {@link Category} * @return {@link List} containing every enabled {@link ItemGroup}
*/ */
@Nonnull @Nonnull
public List<Category> getCategories() { public List<ItemGroup> getCategories() {
return categories; return categories;
} }

View File

@ -3,6 +3,7 @@ package io.github.thebusybiscuit.slimefun4.core.attributes;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.utils.UnbreakingAlgorithm; import io.github.thebusybiscuit.slimefun4.utils.UnbreakingAlgorithm;
import org.bukkit.Sound; import org.bukkit.Sound;
import org.bukkit.enchantments.Enchantment; import org.bukkit.enchantments.Enchantment;
@ -12,7 +13,6 @@ import org.bukkit.inventory.meta.Damageable;
import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.ItemMeta;
import io.github.thebusybiscuit.cscorelib2.config.Config; import io.github.thebusybiscuit.cscorelib2.config.Config;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This interface, when attached to a {@link SlimefunItem}, provides an easy method for damaging * This interface, when attached to a {@link SlimefunItem}, provides an easy method for damaging

View File

@ -8,6 +8,7 @@ import org.apache.commons.lang.Validate;
import org.bukkit.Location; import org.bukkit.Location;
import io.github.thebusybiscuit.cscorelib2.blocks.BlockPosition; import io.github.thebusybiscuit.cscorelib2.blocks.BlockPosition;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNet; import io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNet;
import io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNetComponentType; import io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNetComponentType;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
@ -15,7 +16,6 @@ import io.github.thebusybiscuit.slimefun4.implementation.items.electric.Capacito
import io.github.thebusybiscuit.slimefun4.utils.NumberUtils; import io.github.thebusybiscuit.slimefun4.utils.NumberUtils;
import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils;
import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config; import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.BlockStorage;
/** /**

View File

@ -3,8 +3,7 @@ package io.github.thebusybiscuit.slimefun4.core.attributes;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler; import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* An empty interface that only serves the purpose of bundling together all * An empty interface that only serves the purpose of bundling together all

View File

@ -2,9 +2,9 @@ package io.github.thebusybiscuit.slimefun4.core.attributes;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.core.machines.MachineOperation; import io.github.thebusybiscuit.slimefun4.core.machines.MachineOperation;
import io.github.thebusybiscuit.slimefun4.core.machines.MachineProcessor; import io.github.thebusybiscuit.slimefun4.core.machines.MachineProcessor;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This {@link ItemAttribute} marks a {@link SlimefunItem} as a {@link MachineProcessHolder}. * This {@link ItemAttribute} marks a {@link SlimefunItem} as a {@link MachineProcessHolder}.

View File

@ -1,6 +1,6 @@
package io.github.thebusybiscuit.slimefun4.core.attributes; package io.github.thebusybiscuit.slimefun4.core.attributes;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
/** /**
* Implement this interface for any {@link SlimefunItem} to prevent * Implement this interface for any {@link SlimefunItem} to prevent

View File

@ -3,7 +3,7 @@ package io.github.thebusybiscuit.slimefun4.core.attributes;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.block.BlockPlaceEvent;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
/** /**
* Implement this interface for any {@link SlimefunItem} to prevent * Implement this interface for any {@link SlimefunItem} to prevent

View File

@ -3,9 +3,9 @@ package io.github.thebusybiscuit.slimefun4.core.attributes;
import org.bukkit.entity.Piglin; import org.bukkit.entity.Piglin;
import org.bukkit.event.entity.EntityDropItemEvent; import org.bukkit.event.entity.EntityDropItemEvent;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.listeners.entity.PiglinListener; import io.github.thebusybiscuit.slimefun4.implementation.listeners.entity.PiglinListener;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This interface, when attached to a {@link SlimefunItem}, provides a variable (0-100%) chance for * This interface, when attached to a {@link SlimefunItem}, provides a variable (0-100%) chance for

View File

@ -8,7 +8,7 @@ import org.bukkit.block.Block;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
/** /**
* <strong>DO NOT IMPLEMENT THIS INTERFACE</strong> * <strong>DO NOT IMPLEMENT THIS INTERFACE</strong>

View File

@ -2,7 +2,7 @@ package io.github.thebusybiscuit.slimefun4.core.attributes;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
/** /**
* This Interface, when attached to a class that inherits from {@link SlimefunItem}, marks * This Interface, when attached to a class that inherits from {@link SlimefunItem}, marks

View File

@ -4,10 +4,10 @@ import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.event.entity.EntityDeathEvent;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.items.misc.BasicCircuitBoard; import io.github.thebusybiscuit.slimefun4.implementation.items.misc.BasicCircuitBoard;
import io.github.thebusybiscuit.slimefun4.implementation.listeners.entity.MobDropListener; import io.github.thebusybiscuit.slimefun4.implementation.listeners.entity.MobDropListener;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This interface, when attached to a {@link SlimefunItem}, provides an easy method for adding * This interface, when attached to a {@link SlimefunItem}, provides an easy method for adding

View File

@ -6,11 +6,11 @@ import org.bukkit.Material;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.ItemMeta;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNet; import io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNet;
import io.github.thebusybiscuit.slimefun4.implementation.items.electric.gadgets.Jetpack; import io.github.thebusybiscuit.slimefun4.implementation.items.electric.gadgets.Jetpack;
import io.github.thebusybiscuit.slimefun4.implementation.items.electric.gadgets.MultiTool; import io.github.thebusybiscuit.slimefun4.implementation.items.electric.gadgets.MultiTool;
import io.github.thebusybiscuit.slimefun4.implementation.items.electric.machines.ChargingBench; import io.github.thebusybiscuit.slimefun4.implementation.items.electric.machines.ChargingBench;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* A {@link Rechargeable} {@link SlimefunItem} can hold energy and is able to * A {@link Rechargeable} {@link SlimefunItem} can hold energy and is able to

View File

@ -7,11 +7,12 @@ import javax.annotation.Nonnull;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuide; import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuide;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.implementation.items.geo.GEOMiner; import io.github.thebusybiscuit.slimefun4.implementation.items.geo.GEOMiner;
import io.github.thebusybiscuit.slimefun4.implementation.items.tools.GoldPan; import io.github.thebusybiscuit.slimefun4.implementation.items.tools.GoldPan;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AGenerator; import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AGenerator;
/** /**

View File

@ -1,7 +1,7 @@
package io.github.thebusybiscuit.slimefun4.core.attributes; package io.github.thebusybiscuit.slimefun4.core.attributes;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.items.magical.SoulboundItem; import io.github.thebusybiscuit.slimefun4.implementation.items.magical.SoulboundItem;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This Interface, when attached to a class that inherits from {@link SlimefunItem}, marks * This Interface, when attached to a class that inherits from {@link SlimefunItem}, marks

View File

@ -5,8 +5,8 @@ import javax.annotation.Nonnull;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.entity.Wither; import org.bukkit.entity.Wither;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.WitherProofBlock; import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.WitherProofBlock;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This Interface, when attached to a class that inherits from {@link SlimefunItem}, marks * This Interface, when attached to a class that inherits from {@link SlimefunItem}, marks

View File

@ -9,14 +9,14 @@ import org.bukkit.NamespacedKey;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; 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.player.PlayerProfile; import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile;
import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuide; import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuide;
import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuideMode; import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuideMode;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* A {@link FlexCategory} is a {@link Category} inside the {@link SlimefunGuide} that can * A {@link FlexCategory} is a {@link ItemGroup} inside the {@link SlimefunGuide} that can
* be completely modified. * be completely modified.
* It cannot hold any {@link SlimefunItem} but can be completely overridden * It cannot hold any {@link SlimefunItem} but can be completely overridden
* to perform any action upon being opened. * to perform any action upon being opened.
@ -24,7 +24,7 @@ import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
* @author TheBusyBiscuit * @author TheBusyBiscuit
* *
*/ */
public abstract class FlexCategory extends Category { public abstract class FlexCategory extends ItemGroup {
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
protected FlexCategory(NamespacedKey key, ItemStack item) { protected FlexCategory(NamespacedKey key, ItemStack item) {

View File

@ -15,31 +15,31 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon; import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile; import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* Represents a {@link Category} that cannot be opened until the parent category/categories * Represents a {@link ItemGroup} that cannot be opened until the parent category/categories
* are fully unlocked. * are fully unlocked.
* <p> * <p>
* See {@link Category} for the complete documentation. * See {@link ItemGroup} for the complete documentation.
* *
* @author TheBusyBiscuit * @author TheBusyBiscuit
* *
* @see Category * @see ItemGroup
* @see SeasonalCategory * @see SeasonalCategory
* *
*/ */
public class LockedCategory extends Category { public class LockedCategory extends ItemGroup {
private final NamespacedKey[] keys; private final NamespacedKey[] keys;
private final Set<Category> parents = new HashSet<>(); private final Set<ItemGroup> parents = new HashSet<>();
/** /**
* The basic constructor for a LockedCategory. * The basic constructor for a LockedCategory.
* Like {@link Category}, the default tier is automatically set to 3. * Like {@link ItemGroup}, the default tier is automatically set to 3.
* *
* @param key * @param key
* A unique identifier for this category * A unique identifier for this category
@ -87,7 +87,7 @@ public class LockedCategory extends Category {
} }
} }
for (Category category : SlimefunPlugin.getRegistry().getCategories()) { for (ItemGroup category : SlimefunPlugin.getRegistry().getCategories()) {
if (namespacedKeys.remove(category.getKey())) { if (namespacedKeys.remove(category.getKey())) {
addParent(category); addParent(category);
} }
@ -103,24 +103,24 @@ public class LockedCategory extends Category {
* *
* @return the list of parent categories * @return the list of parent categories
* *
* @see #addParent(Category) * @see #addParent(ItemGroup)
* @see #removeParent(Category) * @see #removeParent(ItemGroup)
*/ */
@Nonnull @Nonnull
public Set<Category> getParents() { public Set<ItemGroup> getParents() {
return parents; return parents;
} }
/** /**
* Adds a parent {@link Category} to this {@link LockedCategory}. * Adds a parent {@link ItemGroup} to this {@link LockedCategory}.
* *
* @param category * @param category
* The {@link Category} to add as a parent * The {@link ItemGroup} to add as a parent
* *
* @see #getParents() * @see #getParents()
* @see #removeParent(Category) * @see #removeParent(ItemGroup)
*/ */
public void addParent(Category category) { public void addParent(ItemGroup category) {
if (category == this || category == null) { if (category == this || category == null) {
throw new IllegalArgumentException("Category '" + item.getItemMeta().getDisplayName() + "' cannot be a parent of itself or have a 'null' parent."); throw new IllegalArgumentException("Category '" + item.getItemMeta().getDisplayName() + "' cannot be a parent of itself or have a 'null' parent.");
} }
@ -129,15 +129,15 @@ public class LockedCategory extends Category {
} }
/** /**
* Removes a {@link Category} from the parents of this {@link LockedCategory}. * Removes a {@link ItemGroup} from the parents of this {@link LockedCategory}.
* *
* @param category * @param category
* The {@link Category} to remove from the parents of this {@link LockedCategory} * The {@link ItemGroup} to remove from the parents of this {@link LockedCategory}
* *
* @see #getParents() * @see #getParents()
* @see #addParent(Category) * @see #addParent(ItemGroup)
*/ */
public void removeParent(@Nonnull Category category) { public void removeParent(@Nonnull ItemGroup category) {
parents.remove(category); parents.remove(category);
} }
@ -155,7 +155,7 @@ public class LockedCategory extends Category {
Validate.notNull(p, "The player cannot be null!"); Validate.notNull(p, "The player cannot be null!");
Validate.notNull(profile, "The Profile cannot be null!"); Validate.notNull(profile, "The Profile cannot be null!");
for (Category category : parents) { for (ItemGroup category : parents) {
for (SlimefunItem item : category.getItems()) { for (SlimefunItem item : category.getItems()) {
// Check if the Player has researched every item (if the item is enabled) // Check if the Player has researched every item (if the item is enabled)
if (!item.isDisabledIn(p.getWorld()) && item.hasResearch() && !profile.hasUnlocked(item.getResearch())) { if (!item.isDisabledIn(p.getWorld()) && item.hasResearch() && !profile.hasUnlocked(item.getResearch())) {

View File

@ -11,18 +11,18 @@ import org.bukkit.NamespacedKey;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import me.mrCookieSlime.Slimefun.Objects.Category; import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
/** /**
* Represents a {@link Category} that is only displayed in the Guide during * Represents a {@link ItemGroup} that is only displayed in the Guide during
* a specified {@link Month}. * a specified {@link Month}.
* *
* @author TheBusyBiscuit * @author TheBusyBiscuit
* *
* @see Category * @see ItemGroup
* @see LockedCategory * @see LockedCategory
*/ */
public class SeasonalCategory extends Category { public class SeasonalCategory extends ItemGroup {
private final Month month; private final Month month;
@ -30,7 +30,7 @@ public class SeasonalCategory extends Category {
* The constructor for a {@link SeasonalCategory}. * The constructor for a {@link SeasonalCategory}.
* *
* @param key * @param key
* The {@link NamespacedKey} that is used to identify this {@link Category} * The {@link NamespacedKey} that is used to identify this {@link ItemGroup}
* @param month * @param month
* The month when the category should be displayed (from 1 = January ; to 12 = December) * The month when the category should be displayed (from 1 = January ; to 12 = December)
* @param tier * @param tier

View File

@ -9,10 +9,10 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon; import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
import me.mrCookieSlime.Slimefun.Objects.Category; import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
/** /**
* The {@link SubCategory} is a child {@link Category} of the * The {@link SubCategory} is a child {@link ItemGroup} of the
* {@link MultiCategory}. * {@link MultiCategory}.
* *
* @author TheBusyBiscuit * @author TheBusyBiscuit
@ -20,7 +20,7 @@ import me.mrCookieSlime.Slimefun.Objects.Category;
* @see MultiCategory * @see MultiCategory
* *
*/ */
public class SubCategory extends Category { public class SubCategory extends ItemGroup {
private final MultiCategory multiCategory; private final MultiCategory multiCategory;

View File

@ -14,9 +14,9 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.command.TabCompleter; import org.bukkit.command.TabCompleter;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.core.researching.Research; import io.github.thebusybiscuit.slimefun4.core.researching.Research;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
class SlimefunTabCompleter implements TabCompleter { class SlimefunTabCompleter implements TabCompleter {

View File

@ -6,11 +6,11 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.core.attributes.Rechargeable; import io.github.thebusybiscuit.slimefun4.core.attributes.Rechargeable;
import io.github.thebusybiscuit.slimefun4.core.commands.SlimefunCommand; import io.github.thebusybiscuit.slimefun4.core.commands.SlimefunCommand;
import io.github.thebusybiscuit.slimefun4.core.commands.SubCommand; import io.github.thebusybiscuit.slimefun4.core.commands.SubCommand;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* {@link ChargeCommand} adds an in game command which charges any {@link Rechargeable} * {@link ChargeCommand} adds an in game command which charges any {@link Rechargeable}

View File

@ -2,12 +2,13 @@ package io.github.thebusybiscuit.slimefun4.core.commands.subcommands;
import io.github.thebusybiscuit.cscorelib2.item.CustomItem; import io.github.thebusybiscuit.cscorelib2.item.CustomItem;
import io.github.thebusybiscuit.cscorelib2.players.PlayerList; import io.github.thebusybiscuit.cscorelib2.players.PlayerList;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.core.commands.SlimefunCommand; import io.github.thebusybiscuit.slimefun4.core.commands.SlimefunCommand;
import io.github.thebusybiscuit.slimefun4.core.commands.SubCommand; import io.github.thebusybiscuit.slimefun4.core.commands.SubCommand;
import io.github.thebusybiscuit.slimefun4.core.multiblocks.MultiBlockMachine; import io.github.thebusybiscuit.slimefun4.core.multiblocks.MultiBlockMachine;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.utils.PatternUtils; import io.github.thebusybiscuit.slimefun4.utils.PatternUtils;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;

View File

@ -10,9 +10,9 @@ import org.apache.commons.lang.Validate;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; 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.player.PlayerProfile; import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* {@link GuideHistory} represents the browsing history of a {@link Player} through the * {@link GuideHistory} represents the browsing history of a {@link Player} through the
@ -70,16 +70,16 @@ public class GuideHistory {
} }
/** /**
* This method adds a {@link Category} to this {@link GuideHistory}. * This method adds a {@link ItemGroup} to this {@link GuideHistory}.
* Should the {@link Category} already be the last element in this {@link GuideHistory}, * Should the {@link ItemGroup} already be the last element in this {@link GuideHistory},
* then the entry will be overridden with the new page. * then the entry will be overridden with the new page.
* *
* @param category * @param category
* The {@link Category} that should be added to this {@link GuideHistory} * The {@link ItemGroup} that should be added to this {@link GuideHistory}
* @param page * @param page
* The current page of the {@link Category} that should be stored * The current page of the {@link ItemGroup} that should be stored
*/ */
public void add(@Nonnull Category category, int page) { public void add(@Nonnull ItemGroup category, int page) {
refresh(category, page); refresh(category, page);
} }
@ -188,8 +188,8 @@ public class GuideHistory {
private <T> void open(@Nonnull SlimefunGuideImplementation guide, @Nullable GuideEntry<T> entry) { private <T> void open(@Nonnull SlimefunGuideImplementation guide, @Nullable GuideEntry<T> entry) {
if (entry == null) { if (entry == null) {
guide.openMainMenu(profile, mainMenuPage); guide.openMainMenu(profile, mainMenuPage);
} else if (entry.getIndexedObject() instanceof Category) { } else if (entry.getIndexedObject() instanceof ItemGroup) {
guide.openCategory(profile, (Category) entry.getIndexedObject(), entry.getPage()); guide.openCategory(profile, (ItemGroup) entry.getIndexedObject(), entry.getPage());
} else if (entry.getIndexedObject() instanceof SlimefunItem) { } else if (entry.getIndexedObject() instanceof SlimefunItem) {
guide.displayItem(profile, (SlimefunItem) entry.getIndexedObject(), false); guide.displayItem(profile, (SlimefunItem) entry.getIndexedObject(), false);
} else if (entry.getIndexedObject() instanceof ItemStack) { } else if (entry.getIndexedObject() instanceof ItemStack) {

View File

@ -10,14 +10,14 @@ import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; 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.player.PlayerProfile; import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.implementation.guide.SurvivalSlimefunGuide; import io.github.thebusybiscuit.slimefun4.implementation.guide.SurvivalSlimefunGuide;
import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils;
import io.github.thebusybiscuit.slimefun4.utils.itemstack.SlimefunGuideItem; import io.github.thebusybiscuit.slimefun4.utils.itemstack.SlimefunGuideItem;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This is a static utility class that provides convenient access to the methods * This is a static utility class that provides convenient access to the methods
@ -83,7 +83,7 @@ public final class SlimefunGuide {
} }
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public static void openCategory(PlayerProfile profile, Category category, SlimefunGuideMode mode, int selectedPage) { public static void openCategory(PlayerProfile profile, ItemGroup category, SlimefunGuideMode mode, int selectedPage) {
SlimefunPlugin.getRegistry().getSlimefunGuide(mode).openCategory(profile, category, selectedPage); SlimefunPlugin.getRegistry().getSlimefunGuide(mode).openCategory(profile, category, selectedPage);
} }

View File

@ -9,13 +9,13 @@ import org.bukkit.GameMode;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; 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.player.PlayerProfile; import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile;
import io.github.thebusybiscuit.slimefun4.core.guide.options.SlimefunGuideSettings; import io.github.thebusybiscuit.slimefun4.core.guide.options.SlimefunGuideSettings;
import io.github.thebusybiscuit.slimefun4.core.researching.Research; import io.github.thebusybiscuit.slimefun4.core.researching.Research;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.implementation.guide.SurvivalSlimefunGuide; import io.github.thebusybiscuit.slimefun4.implementation.guide.SurvivalSlimefunGuide;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This interface is used for the different implementations that add behaviour * This interface is used for the different implementations that add behaviour
@ -52,7 +52,7 @@ public interface SlimefunGuideImplementation {
void openMainMenu(PlayerProfile profile, int page); void openMainMenu(PlayerProfile profile, int page);
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
void openCategory(PlayerProfile profile, Category category, int page); void openCategory(PlayerProfile profile, ItemGroup category, int page);
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
void openSearch(PlayerProfile profile, String input, boolean addToHistory); void openSearch(PlayerProfile profile, String input, boolean addToHistory);

View File

@ -1,7 +1,7 @@
package io.github.thebusybiscuit.slimefun4.core.guide; package io.github.thebusybiscuit.slimefun4.core.guide;
import io.github.thebusybiscuit.cscorelib2.inventory.ChestMenu; import io.github.thebusybiscuit.cscorelib2.inventory.ChestMenu;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
/** /**
* This enum holds the different designs a {@link SlimefunGuide} can have. * This enum holds the different designs a {@link SlimefunGuide} can have.

View File

@ -12,8 +12,8 @@ import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.events.AndroidMineEvent; import io.github.thebusybiscuit.slimefun4.api.events.AndroidMineEvent;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler; import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.items.androids.MinerAndroid; import io.github.thebusybiscuit.slimefun4.implementation.items.androids.MinerAndroid;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* The {@link BlockBreakHandler} is called when a {@link Block} is broken * The {@link BlockBreakHandler} is called when a {@link Block} is broken

View File

@ -9,9 +9,9 @@ import org.bukkit.event.block.BlockDispenseEvent;
import io.github.thebusybiscuit.slimefun4.api.exceptions.IncompatibleItemHandlerException; import io.github.thebusybiscuit.slimefun4.api.exceptions.IncompatibleItemHandlerException;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler; import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.core.attributes.NotPlaceable; import io.github.thebusybiscuit.slimefun4.core.attributes.NotPlaceable;
import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.BlockPlacer; import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.BlockPlacer;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This {@link ItemHandler} is triggered when the {@link SlimefunItem} it was assigned to * This {@link ItemHandler} is triggered when the {@link SlimefunItem} it was assigned to

View File

@ -8,8 +8,8 @@ import org.bukkit.event.block.BlockPlaceEvent;
import io.github.thebusybiscuit.slimefun4.api.events.BlockPlacerPlaceEvent; import io.github.thebusybiscuit.slimefun4.api.events.BlockPlacerPlaceEvent;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler; import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.BlockPlacer; import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.BlockPlacer;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This {@link ItemHandler} is called whenever a {@link Block} was placed. * This {@link ItemHandler} is called whenever a {@link Block} was placed.

View File

@ -5,8 +5,8 @@ import java.util.Optional;
import io.github.thebusybiscuit.slimefun4.api.events.PlayerRightClickEvent; import io.github.thebusybiscuit.slimefun4.api.events.PlayerRightClickEvent;
import io.github.thebusybiscuit.slimefun4.api.exceptions.IncompatibleItemHandlerException; import io.github.thebusybiscuit.slimefun4.api.exceptions.IncompatibleItemHandlerException;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler; import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.core.attributes.NotPlaceable; import io.github.thebusybiscuit.slimefun4.core.attributes.NotPlaceable;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
@FunctionalInterface @FunctionalInterface
public interface BlockUseHandler extends ItemHandler { public interface BlockUseHandler extends ItemHandler {

View File

@ -8,8 +8,8 @@ import org.bukkit.event.entity.EntityDamageByEntityEvent;
import io.github.thebusybiscuit.slimefun4.api.exceptions.IncompatibleItemHandlerException; import io.github.thebusybiscuit.slimefun4.api.exceptions.IncompatibleItemHandlerException;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler; import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.items.weapons.SlimefunBow; import io.github.thebusybiscuit.slimefun4.implementation.items.weapons.SlimefunBow;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This {@link ItemHandler} is triggered when the {@link SlimefunItem} it was assigned to * This {@link ItemHandler} is triggered when the {@link SlimefunItem} it was assigned to

View File

@ -8,9 +8,9 @@ import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler; import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem; import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.listeners.entity.EntityInteractionListener; import io.github.thebusybiscuit.slimefun4.implementation.listeners.entity.EntityInteractionListener;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This is triggered when a {@link Player} interacts with an {@link Entity}. * This is triggered when a {@link Player} interacts with an {@link Entity}.

View File

@ -6,8 +6,8 @@ import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler; import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem; import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* If this {@link ItemHandler} is added to a {@link SlimefunItem} it will listen * If this {@link ItemHandler} is added to a {@link SlimefunItem} it will listen

View File

@ -4,8 +4,7 @@ import org.bukkit.event.Event;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler; import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* A {@link GlobalItemHandler} is a special type of {@link ItemHandler} * A {@link GlobalItemHandler} is a special type of {@link ItemHandler}

View File

@ -5,10 +5,10 @@ import org.bukkit.event.player.PlayerItemConsumeEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler; import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem; import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.items.food.DietCookie; import io.github.thebusybiscuit.slimefun4.implementation.items.food.DietCookie;
import io.github.thebusybiscuit.slimefun4.implementation.items.food.FortuneCookie; import io.github.thebusybiscuit.slimefun4.implementation.items.food.FortuneCookie;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This {@link ItemHandler} is triggered when the {@link SlimefunItem} it was assigned to * This {@link ItemHandler} is triggered when the {@link SlimefunItem} it was assigned to

View File

@ -4,8 +4,8 @@ import org.bukkit.entity.Player;
import io.github.thebusybiscuit.slimefun4.api.events.PlayerRightClickEvent; import io.github.thebusybiscuit.slimefun4.api.events.PlayerRightClickEvent;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler; import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem; import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This {@link ItemHandler} is triggered when the {@link SlimefunItem} it was assigned to * This {@link ItemHandler} is triggered when the {@link SlimefunItem} it was assigned to

View File

@ -7,9 +7,9 @@ import org.bukkit.entity.Player;
import io.github.thebusybiscuit.slimefun4.api.exceptions.IncompatibleItemHandlerException; import io.github.thebusybiscuit.slimefun4.api.exceptions.IncompatibleItemHandlerException;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler; import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.core.multiblocks.MultiBlock; import io.github.thebusybiscuit.slimefun4.core.multiblocks.MultiBlock;
import io.github.thebusybiscuit.slimefun4.core.multiblocks.MultiBlockMachine; import io.github.thebusybiscuit.slimefun4.core.multiblocks.MultiBlockMachine;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This {@link ItemHandler} is called whenever a {@link Player} interacts with * This {@link ItemHandler} is called whenever a {@link Player} interacts with

View File

@ -14,11 +14,11 @@ import org.bukkit.block.data.type.GlassPane;
import io.github.thebusybiscuit.cscorelib2.collections.LoopIterator; import io.github.thebusybiscuit.cscorelib2.collections.LoopIterator;
import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion; import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.RainbowBlock; import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.RainbowBlock;
import io.github.thebusybiscuit.slimefun4.utils.ColoredMaterial; import io.github.thebusybiscuit.slimefun4.utils.ColoredMaterial;
import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config; import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker; import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker;
/** /**

View File

@ -8,8 +8,7 @@ import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler; import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This {@link ItemHandler} is called when a {@link Block} is broken with a {@link SlimefunItem} * This {@link ItemHandler} is called when a {@link Block} is broken with a {@link SlimefunItem}

View File

@ -8,8 +8,7 @@ import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler; import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This is triggered when a {@link Player} attacks an {@link Entity}. * This is triggered when a {@link Player} attacks an {@link Entity}.

View File

@ -16,9 +16,9 @@ import org.bukkit.block.BlockFace;
import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion; import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion;
import io.github.thebusybiscuit.slimefun4.api.events.MultiBlockInteractEvent; import io.github.thebusybiscuit.slimefun4.api.events.MultiBlockInteractEvent;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.core.handlers.MultiBlockInteractionHandler; import io.github.thebusybiscuit.slimefun4.core.handlers.MultiBlockInteractionHandler;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* A {@link MultiBlock} represents a structure build in a {@link World}. * A {@link MultiBlock} represents a structure build in a {@link World}.

View File

@ -22,6 +22,8 @@ import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.cscorelib2.inventory.InvUtils; import io.github.thebusybiscuit.cscorelib2.inventory.InvUtils;
import io.github.thebusybiscuit.cscorelib2.protection.ProtectableAction; import io.github.thebusybiscuit.cscorelib2.protection.ProtectableAction;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon; import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
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.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.core.attributes.NotPlaceable; import io.github.thebusybiscuit.slimefun4.core.attributes.NotPlaceable;
import io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem; import io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem;
@ -30,8 +32,6 @@ import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.OutputChest; import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.OutputChest;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* A {@link MultiBlockMachine} is a {@link SlimefunItem} that is built in the {@link World}. * A {@link MultiBlockMachine} is a {@link SlimefunItem} that is built in the {@link World}.
@ -49,7 +49,7 @@ public abstract class MultiBlockMachine extends SlimefunItem implements NotPlace
protected final MultiBlock multiblock; protected final MultiBlock multiblock;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
protected MultiBlockMachine(Category category, SlimefunItemStack item, ItemStack[] recipe, ItemStack[] machineRecipes, BlockFace trigger) { protected MultiBlockMachine(ItemGroup category, SlimefunItemStack item, ItemStack[] recipe, ItemStack[] machineRecipes, BlockFace trigger) {
super(category, item, RecipeType.MULTIBLOCK, recipe); super(category, item, RecipeType.MULTIBLOCK, recipe);
this.recipes = new ArrayList<>(); this.recipes = new ArrayList<>();
this.displayRecipes = new ArrayList<>(); this.displayRecipes = new ArrayList<>();
@ -60,7 +60,7 @@ public abstract class MultiBlockMachine extends SlimefunItem implements NotPlace
} }
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
protected MultiBlockMachine(Category category, SlimefunItemStack item, ItemStack[] recipe, BlockFace trigger) { protected MultiBlockMachine(ItemGroup category, SlimefunItemStack item, ItemStack[] recipe, BlockFace trigger) {
this(category, item, recipe, new ItemStack[0], trigger); this(category, item, recipe, new ItemStack[0], trigger);
} }

View File

@ -32,13 +32,14 @@ import org.bukkit.inventory.meta.ItemMeta;
import io.github.thebusybiscuit.cscorelib2.chat.ChatColors; import io.github.thebusybiscuit.cscorelib2.chat.ChatColors;
import io.github.thebusybiscuit.cscorelib2.item.CustomItem; import io.github.thebusybiscuit.cscorelib2.item.CustomItem;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.api.network.Network; import io.github.thebusybiscuit.slimefun4.api.network.Network;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils;
import io.github.thebusybiscuit.slimefun4.utils.NumberUtils; import io.github.thebusybiscuit.slimefun4.utils.NumberUtils;
import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils;
import io.papermc.lib.PaperLib; import io.papermc.lib.PaperLib;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
import me.mrCookieSlime.Slimefun.api.inventory.DirtyChestMenu; import me.mrCookieSlime.Slimefun.api.inventory.DirtyChestMenu;

View File

@ -22,11 +22,11 @@ import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.cscorelib2.blocks.BlockPosition; import io.github.thebusybiscuit.cscorelib2.blocks.BlockPosition;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.core.networks.NetworkManager; import io.github.thebusybiscuit.slimefun4.core.networks.NetworkManager;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config; import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.inventory.DirtyChestMenu; import me.mrCookieSlime.Slimefun.api.inventory.DirtyChestMenu;

View File

@ -11,11 +11,11 @@ import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.items.cargo.CargoNode; import io.github.thebusybiscuit.slimefun4.implementation.items.cargo.CargoNode;
import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils;
import io.github.thebusybiscuit.slimefun4.utils.itemstack.ItemStackWrapper; import io.github.thebusybiscuit.slimefun4.utils.itemstack.ItemStackWrapper;
import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config; import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;

View File

@ -16,6 +16,7 @@ import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import io.github.thebusybiscuit.slimefun4.api.ErrorReport; import io.github.thebusybiscuit.slimefun4.api.ErrorReport;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.api.network.Network; import io.github.thebusybiscuit.slimefun4.api.network.Network;
import io.github.thebusybiscuit.slimefun4.api.network.NetworkComponent; import io.github.thebusybiscuit.slimefun4.api.network.NetworkComponent;
import io.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetComponent; import io.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetComponent;
@ -25,7 +26,6 @@ import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.utils.NumberUtils; import io.github.thebusybiscuit.slimefun4.utils.NumberUtils;
import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config; import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.BlockStorage;
/** /**

View File

@ -20,13 +20,13 @@ import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.events.PlayerPreResearchEvent; import io.github.thebusybiscuit.slimefun4.api.events.PlayerPreResearchEvent;
import io.github.thebusybiscuit.slimefun4.api.events.ResearchUnlockEvent; import io.github.thebusybiscuit.slimefun4.api.events.ResearchUnlockEvent;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile; import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile;
import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuideImplementation; import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuideImplementation;
import io.github.thebusybiscuit.slimefun4.core.services.localization.Language; import io.github.thebusybiscuit.slimefun4.core.services.localization.Language;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.implementation.setup.ResearchSetup; import io.github.thebusybiscuit.slimefun4.implementation.setup.ResearchSetup;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* Represents a research, which is bound to one * Represents a research, which is bound to one
@ -201,13 +201,13 @@ public class Research implements Keyed {
* @param sfItem * @param sfItem
* The {@link SlimefunItem} on which the {@link Player} clicked. * The {@link SlimefunItem} on which the {@link Player} clicked.
* @param category * @param category
* The {@link Category} where the {@link Player} was. * The {@link ItemGroup} where the {@link Player} was.
* @param page * @param page
* The page number of where the {@link Player} was in the {@link Category}; * The page number of where the {@link Player} was in the {@link ItemGroup};
* *
*/ */
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public void unlockFromGuide(SlimefunGuideImplementation guide, Player player, PlayerProfile profile, SlimefunItem sfItem, Category category, int page) { public void unlockFromGuide(SlimefunGuideImplementation guide, Player player, PlayerProfile profile, SlimefunItem sfItem, ItemGroup category, int page) {
if (!SlimefunPlugin.getRegistry().getCurrentlyResearchingPlayers().contains(player.getUniqueId())) { if (!SlimefunPlugin.getRegistry().getCurrentlyResearchingPlayers().contains(player.getUniqueId())) {
if (profile.hasUnlocked(this)) { if (profile.hasUnlocked(this)) {
guide.openCategory(profile, category, page); guide.openCategory(profile, category, page);

View File

@ -15,10 +15,9 @@ import org.bukkit.persistence.PersistentDataContainer;
import org.bukkit.persistence.PersistentDataType; import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This Service is responsible for applying NBT data to a {@link SlimefunItemStack}. * This Service is responsible for applying NBT data to a {@link SlimefunItemStack}.
* This is used to ensure that the id of a {@link SlimefunItem} is stored alongside any * This is used to ensure that the id of a {@link SlimefunItem} is stored alongside any

View File

@ -17,9 +17,9 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.ItemMeta;
import io.github.thebusybiscuit.cscorelib2.config.Config; import io.github.thebusybiscuit.cscorelib2.config.Config;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This Service is responsible for applying custom model data to any {@link SlimefunItemStack} * This Service is responsible for applying custom model data to any {@link SlimefunItemStack}

View File

@ -21,8 +21,8 @@ import io.github.thebusybiscuit.cscorelib2.collections.OptionalMap;
import io.github.thebusybiscuit.cscorelib2.config.Config; import io.github.thebusybiscuit.cscorelib2.config.Config;
import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion; import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon; import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This Service is responsible for disabling a {@link SlimefunItem} in a certain {@link World}. * This Service is responsible for disabling a {@link SlimefunItem} in a certain {@link World}.

View File

@ -15,8 +15,8 @@ import org.bukkit.permissions.Permissible;
import org.bukkit.permissions.Permission; import org.bukkit.permissions.Permission;
import io.github.thebusybiscuit.cscorelib2.config.Config; import io.github.thebusybiscuit.cscorelib2.config.Config;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This Service is responsible for handling the {@link Permission} of a * This Service is responsible for handling the {@link Permission} of a

View File

@ -10,7 +10,7 @@ import org.bukkit.block.Block;
import io.github.thebusybiscuit.cscorelib2.blocks.BlockPosition; import io.github.thebusybiscuit.cscorelib2.blocks.BlockPosition;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon; import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
/** /**
* This represents an entry in our {@link SlimefunProfiler}. * This represents an entry in our {@link SlimefunProfiler}.

View File

@ -23,10 +23,10 @@ import org.bukkit.block.Block;
import org.bukkit.scheduler.BukkitScheduler; import org.bukkit.scheduler.BukkitScheduler;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon; import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.implementation.tasks.TickerTask; import io.github.thebusybiscuit.slimefun4.implementation.tasks.TickerTask;
import io.github.thebusybiscuit.slimefun4.utils.NumberUtils; import io.github.thebusybiscuit.slimefun4.utils.NumberUtils;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* The {@link SlimefunProfiler} works closely to the {@link TickerTask} and is * The {@link SlimefunProfiler} works closely to the {@link TickerTask} and is

View File

@ -36,6 +36,7 @@ import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
import io.github.thebusybiscuit.slimefun4.api.exceptions.TagMisconfigurationException; import io.github.thebusybiscuit.slimefun4.api.exceptions.TagMisconfigurationException;
import io.github.thebusybiscuit.slimefun4.api.geo.GEOResource; import io.github.thebusybiscuit.slimefun4.api.geo.GEOResource;
import io.github.thebusybiscuit.slimefun4.api.gps.GPSNetwork; import io.github.thebusybiscuit.slimefun4.api.gps.GPSNetwork;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile; import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile;
import io.github.thebusybiscuit.slimefun4.core.SlimefunRegistry; import io.github.thebusybiscuit.slimefun4.core.SlimefunRegistry;
import io.github.thebusybiscuit.slimefun4.core.commands.SlimefunCommand; import io.github.thebusybiscuit.slimefun4.core.commands.SlimefunCommand;
@ -120,7 +121,6 @@ import io.github.thebusybiscuit.slimefun4.utils.tags.SlimefunTag;
import io.papermc.lib.PaperLib; import io.papermc.lib.PaperLib;
import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.MenuListener; import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.MenuListener;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.inventory.UniversalBlockMenu; import me.mrCookieSlime.Slimefun.api.inventory.UniversalBlockMenu;

View File

@ -11,6 +11,8 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.Recipe; import org.bukkit.inventory.Recipe;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile; import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile;
import io.github.thebusybiscuit.slimefun4.core.categories.FlexCategory; import io.github.thebusybiscuit.slimefun4.core.categories.FlexCategory;
import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuideMode; import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuideMode;
@ -18,8 +20,6 @@ import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils;
import io.github.thebusybiscuit.slimefun4.utils.itemstack.SlimefunGuideItem; import io.github.thebusybiscuit.slimefun4.utils.itemstack.SlimefunGuideItem;
import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu; import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This is an admin-variant of the {@link SurvivalSlimefunGuide} which allows a {@link Player} * This is an admin-variant of the {@link SurvivalSlimefunGuide} which allows a {@link Player}
@ -39,20 +39,20 @@ public class CheatSheetSlimefunGuide extends SurvivalSlimefunGuide {
} }
/** /**
* Returns a {@link List} of visible {@link Category} instances that the {@link SlimefunGuide} would display. * Returns a {@link List} of visible {@link ItemGroup} instances that the {@link SlimefunGuide} would display.
* *
* @param p * @param p
* The {@link Player} who opened his {@link SlimefunGuide} * The {@link Player} who opened his {@link SlimefunGuide}
* @param profile * @param profile
* The {@link PlayerProfile} of the {@link Player} * The {@link PlayerProfile} of the {@link Player}
* @return a {@link List} of visible {@link Category} instances * @return a {@link List} of visible {@link ItemGroup} instances
*/ */
@Nonnull @Nonnull
@Override @Override
protected List<Category> getVisibleCategories(@Nonnull Player p, @Nonnull PlayerProfile profile) { protected List<ItemGroup> getVisibleCategories(@Nonnull Player p, @Nonnull PlayerProfile profile) {
List<Category> categories = new LinkedList<>(); List<ItemGroup> categories = new LinkedList<>();
for (Category category : SlimefunPlugin.getRegistry().getCategories()) { for (ItemGroup category : SlimefunPlugin.getRegistry().getCategories()) {
if (!(category instanceof FlexCategory)) { if (!(category instanceof FlexCategory)) {
categories.add(category); categories.add(category);
} }

View File

@ -29,6 +29,8 @@ import io.github.thebusybiscuit.cscorelib2.inventory.ItemUtils;
import io.github.thebusybiscuit.cscorelib2.item.CustomItem; import io.github.thebusybiscuit.cscorelib2.item.CustomItem;
import io.github.thebusybiscuit.cscorelib2.recipes.MinecraftRecipe; import io.github.thebusybiscuit.cscorelib2.recipes.MinecraftRecipe;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon; import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile; import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile;
import io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem; import io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem;
import io.github.thebusybiscuit.slimefun4.core.categories.FlexCategory; import io.github.thebusybiscuit.slimefun4.core.categories.FlexCategory;
@ -49,8 +51,6 @@ import io.github.thebusybiscuit.slimefun4.utils.itemstack.SlimefunGuideItem;
import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu; import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu;
import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu.MenuClickHandler; import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu.MenuClickHandler;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* The {@link SurvivalSlimefunGuide} is the standard version of our {@link SlimefunGuide}. * The {@link SurvivalSlimefunGuide} is the standard version of our {@link SlimefunGuide}.
@ -103,19 +103,19 @@ public class SurvivalSlimefunGuide implements SlimefunGuideImplementation {
} }
/** /**
* Returns a {@link List} of visible {@link Category} instances that the {@link SlimefunGuide} would display. * Returns a {@link List} of visible {@link ItemGroup} instances that the {@link SlimefunGuide} would display.
* *
* @param p * @param p
* The {@link Player} who opened his {@link SlimefunGuide} * The {@link Player} who opened his {@link SlimefunGuide}
* @param profile * @param profile
* The {@link PlayerProfile} of the {@link Player} * The {@link PlayerProfile} of the {@link Player}
* @return a {@link List} of visible {@link Category} instances * @return a {@link List} of visible {@link ItemGroup} instances
*/ */
@Nonnull @Nonnull
protected List<Category> getVisibleCategories(@Nonnull Player p, @Nonnull PlayerProfile profile) { protected List<ItemGroup> getVisibleCategories(@Nonnull Player p, @Nonnull PlayerProfile profile) {
List<Category> categories = new LinkedList<>(); List<ItemGroup> categories = new LinkedList<>();
for (Category category : SlimefunPlugin.getRegistry().getCategories()) { for (ItemGroup category : SlimefunPlugin.getRegistry().getCategories()) {
try { try {
if (!category.isHidden(p) && (!(category instanceof FlexCategory) || ((FlexCategory) category).isVisible(p, profile, getMode()))) { if (!category.isHidden(p) && (!(category instanceof FlexCategory) || ((FlexCategory) category).isVisible(p, profile, getMode()))) {
categories.add(category); categories.add(category);
@ -149,7 +149,7 @@ public class SurvivalSlimefunGuide implements SlimefunGuideImplementation {
} }
ChestMenu menu = create(p); ChestMenu menu = create(p);
List<Category> categories = getVisibleCategories(p, profile); List<ItemGroup> categories = getVisibleCategories(p, profile);
int index = 9; int index = 9;
createHeader(p, profile, menu); createHeader(p, profile, menu);
@ -159,7 +159,7 @@ public class SurvivalSlimefunGuide implements SlimefunGuideImplementation {
while (target < (categories.size() - 1) && index < CATEGORY_SIZE + 9) { while (target < (categories.size() - 1) && index < CATEGORY_SIZE + 9) {
target++; target++;
Category category = categories.get(target); ItemGroup category = categories.get(target);
displayCategory(menu, p, profile, category, index); displayCategory(menu, p, profile, category, index);
index++; index++;
@ -192,7 +192,7 @@ public class SurvivalSlimefunGuide implements SlimefunGuideImplementation {
menu.open(p); menu.open(p);
} }
private void displayCategory(ChestMenu menu, Player p, PlayerProfile profile, Category category, int index) { private void displayCategory(ChestMenu menu, Player p, PlayerProfile profile, ItemGroup category, int index) {
if (!(category instanceof LockedCategory) || !isSurvivalMode() || ((LockedCategory) category).hasUnlocked(p, profile)) { if (!(category instanceof LockedCategory) || !isSurvivalMode() || ((LockedCategory) category).hasUnlocked(p, profile)) {
menu.addItem(index, category.getItem(p)); menu.addItem(index, category.getItem(p));
menu.addMenuClickHandler(index, (pl, slot, item, action) -> { menu.addMenuClickHandler(index, (pl, slot, item, action) -> {
@ -209,7 +209,7 @@ public class SurvivalSlimefunGuide implements SlimefunGuideImplementation {
lore.add(""); lore.add("");
for (Category parent : ((LockedCategory) category).getParents()) { for (ItemGroup parent : ((LockedCategory) category).getParents()) {
lore.add(parent.getItem(p).getItemMeta().getDisplayName()); lore.add(parent.getItem(p).getItemMeta().getDisplayName());
} }
@ -219,7 +219,7 @@ public class SurvivalSlimefunGuide implements SlimefunGuideImplementation {
} }
@Override @Override
public void openCategory(PlayerProfile profile, Category category, int page) { public void openCategory(PlayerProfile profile, ItemGroup category, int page) {
Player p = profile.getPlayer(); Player p = profile.getPlayer();
if (p == null) { if (p == null) {
@ -285,7 +285,7 @@ public class SurvivalSlimefunGuide implements SlimefunGuideImplementation {
menu.open(p); menu.open(p);
} }
private void displaySlimefunItem(ChestMenu menu, Category category, Player p, PlayerProfile profile, SlimefunItem sfitem, int page, int index) { private void displaySlimefunItem(ChestMenu menu, ItemGroup category, Player p, PlayerProfile profile, SlimefunItem sfitem, int page, int index) {
Research research = sfitem.getResearch(); Research research = sfitem.getResearch();
if (isSurvivalMode() && !hasPermission(p, sfitem)) { if (isSurvivalMode() && !hasPermission(p, sfitem)) {
@ -349,7 +349,7 @@ public class SurvivalSlimefunGuide implements SlimefunGuideImplementation {
if (!slimefunItem.isHidden() && isSearchFilterApplicable(slimefunItem, searchTerm)) { if (!slimefunItem.isHidden() && isSearchFilterApplicable(slimefunItem, searchTerm)) {
ItemStack itemstack = new CustomItem(slimefunItem.getItem(), meta -> { ItemStack itemstack = new CustomItem(slimefunItem.getItem(), meta -> {
Category category = slimefunItem.getCategory(); ItemGroup category = slimefunItem.getCategory();
meta.setLore(Arrays.asList("", ChatColor.DARK_GRAY + "\u21E8 " + ChatColor.WHITE + category.getDisplayName(p))); meta.setLore(Arrays.asList("", ChatColor.DARK_GRAY + "\u21E8 " + ChatColor.WHITE + category.getDisplayName(p)));
meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_ENCHANTS, ItemFlag.HIDE_POTION_EFFECTS); meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES, ItemFlag.HIDE_ENCHANTS, ItemFlag.HIDE_POTION_EFFECTS);
}); });

View File

@ -14,9 +14,9 @@ import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.core.handlers.BlockBreakHandler; import io.github.thebusybiscuit.slimefun4.core.handlers.BlockBreakHandler;
import io.papermc.lib.PaperLib; import io.papermc.lib.PaperLib;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This is an implementation of {@link BlockBreakHandler} which is suited for any {@link SlimefunItem} * This is an implementation of {@link BlockBreakHandler} which is suited for any {@link SlimefunItem}

View File

@ -7,14 +7,14 @@ import javax.annotation.ParametersAreNonnullByDefault;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.events.PlayerRightClickEvent; import io.github.thebusybiscuit.slimefun4.api.events.PlayerRightClickEvent;
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.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.core.attributes.NotPlaceable; import io.github.thebusybiscuit.slimefun4.core.attributes.NotPlaceable;
import io.github.thebusybiscuit.slimefun4.core.attributes.Radioactive; import io.github.thebusybiscuit.slimefun4.core.attributes.Radioactive;
import io.github.thebusybiscuit.slimefun4.core.attributes.Radioactivity; import io.github.thebusybiscuit.slimefun4.core.attributes.Radioactivity;
import io.github.thebusybiscuit.slimefun4.core.handlers.ItemUseHandler; import io.github.thebusybiscuit.slimefun4.core.handlers.ItemUseHandler;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* A quick and easy implementation of {@link SlimefunItem} that also implements the * A quick and easy implementation of {@link SlimefunItem} that also implements the
@ -40,7 +40,7 @@ public class RadioactiveItem extends SlimefunItem implements Radioactive, NotPla
* This will create a new {@link RadioactiveItem} with the given level of {@link Radioactivity} * This will create a new {@link RadioactiveItem} with the given level of {@link Radioactivity}
* *
* @param category * @param category
* The {@link Category} of this {@link SlimefunItem} * The {@link ItemGroup} of this {@link SlimefunItem}
* @param radioactivity * @param radioactivity
* the level of {@link Radioactivity} * the level of {@link Radioactivity}
* @param item * @param item
@ -51,7 +51,7 @@ public class RadioactiveItem extends SlimefunItem implements Radioactive, NotPla
* The recipe of how to craft this {@link SlimefunItem} * The recipe of how to craft this {@link SlimefunItem}
*/ */
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public RadioactiveItem(Category category, Radioactivity radioactivity, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public RadioactiveItem(ItemGroup category, Radioactivity radioactivity, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
this(category, radioactivity, item, recipeType, recipe, null); this(category, radioactivity, item, recipeType, recipe, null);
} }
@ -59,7 +59,7 @@ public class RadioactiveItem extends SlimefunItem implements Radioactive, NotPla
* This will create a new {@link RadioactiveItem} with the given level of {@link Radioactivity} * This will create a new {@link RadioactiveItem} with the given level of {@link Radioactivity}
* *
* @param category * @param category
* The {@link Category} of this {@link SlimefunItem} * The {@link ItemGroup} of this {@link SlimefunItem}
* @param radioactivity * @param radioactivity
* the level of {@link Radioactivity} * the level of {@link Radioactivity}
* @param item * @param item
@ -72,7 +72,7 @@ public class RadioactiveItem extends SlimefunItem implements Radioactive, NotPla
* The recipe output * The recipe output
*/ */
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public RadioactiveItem(Category category, Radioactivity radioactivity, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, @Nullable ItemStack recipeOutput) { public RadioactiveItem(ItemGroup category, Radioactivity radioactivity, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, @Nullable ItemStack recipeOutput) {
super(category, item, recipeType, recipe, recipeOutput); super(category, item, recipeType, recipe, recipeOutput);
this.radioactivity = radioactivity; this.radioactivity = radioactivity;

View File

@ -6,13 +6,13 @@ import javax.annotation.ParametersAreNonnullByDefault;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler; import io.github.thebusybiscuit.slimefun4.api.items.ItemHandler;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.core.handlers.ItemUseHandler; import io.github.thebusybiscuit.slimefun4.core.handlers.ItemUseHandler;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* This is basically a quickstart class for your very first {@link SlimefunItem}. * This is basically a quickstart class for your very first {@link SlimefunItem}.
@ -33,12 +33,12 @@ import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
public abstract class SimpleSlimefunItem<T extends ItemHandler> extends SlimefunItem { public abstract class SimpleSlimefunItem<T extends ItemHandler> extends SlimefunItem {
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
protected SimpleSlimefunItem(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { protected SimpleSlimefunItem(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, item, recipeType, recipe); super(category, item, recipeType, recipe);
} }
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
protected SimpleSlimefunItem(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, @Nullable ItemStack recipeOutput) { protected SimpleSlimefunItem(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, @Nullable ItemStack recipeOutput) {
super(category, item, recipeType, recipe, recipeOutput); super(category, item, recipeType, recipe, recipeOutput);
} }

View File

@ -4,10 +4,11 @@ import javax.annotation.ParametersAreNonnullByDefault;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.ItemState; import io.github.thebusybiscuit.slimefun4.api.items.ItemState;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* Represents a vanilla item that is overridden by Slimefun (like {@code ELYTRA}). * Represents a vanilla item that is overridden by Slimefun (like {@code ELYTRA}).
@ -41,7 +42,7 @@ public class VanillaItem extends SlimefunItem {
* the recipe to obtain this {@link VanillaItem} * the recipe to obtain this {@link VanillaItem}
*/ */
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public VanillaItem(Category category, ItemStack item, String id, RecipeType recipeType, ItemStack[] recipe) { public VanillaItem(ItemGroup category, ItemStack item, String id, RecipeType recipeType, ItemStack[] recipe) {
super(category, item, id, recipeType, recipe); super(category, item, id, recipeType, recipe);
useableInWorkbench = true; useableInWorkbench = true;

View File

@ -9,14 +9,14 @@ import javax.annotation.ParametersAreNonnullByDefault;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.events.AncientAltarCraftEvent; import io.github.thebusybiscuit.slimefun4.api.events.AncientAltarCraftEvent;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.ItemSetting; import io.github.thebusybiscuit.slimefun4.api.items.ItemSetting;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.settings.IntRangeSetting; import io.github.thebusybiscuit.slimefun4.api.items.settings.IntRangeSetting;
import io.github.thebusybiscuit.slimefun4.implementation.listeners.AncientAltarListener; import io.github.thebusybiscuit.slimefun4.implementation.listeners.AncientAltarListener;
import io.github.thebusybiscuit.slimefun4.implementation.tasks.AncientAltarTask; import io.github.thebusybiscuit.slimefun4.implementation.tasks.AncientAltarTask;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* The {@link AncientAltar} is a multiblock structure. * The {@link AncientAltar} is a multiblock structure.
@ -45,7 +45,7 @@ public class AncientAltar extends SlimefunItem {
private final ItemSetting<Integer> stepDelay = new IntRangeSetting(this, "step-delay", 0, DEFAULT_STEP_DELAY, Integer.MAX_VALUE); private final ItemSetting<Integer> stepDelay = new IntRangeSetting(this, "step-delay", 0, DEFAULT_STEP_DELAY, Integer.MAX_VALUE);
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public AncientAltar(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public AncientAltar(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, item, recipeType, recipe); super(category, item, recipeType, recipe);
addItemSetting(stepDelay); addItemSetting(stepDelay);

View File

@ -21,6 +21,7 @@ import org.bukkit.util.Vector;
import io.github.thebusybiscuit.cscorelib2.chat.ChatColors; import io.github.thebusybiscuit.cscorelib2.chat.ChatColors;
import io.github.thebusybiscuit.cscorelib2.inventory.ItemUtils; import io.github.thebusybiscuit.cscorelib2.inventory.ItemUtils;
import io.github.thebusybiscuit.cscorelib2.item.CustomItem; import io.github.thebusybiscuit.cscorelib2.item.CustomItem;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.core.handlers.BlockBreakHandler; import io.github.thebusybiscuit.slimefun4.core.handlers.BlockBreakHandler;
import io.github.thebusybiscuit.slimefun4.core.handlers.BlockDispenseHandler; import io.github.thebusybiscuit.slimefun4.core.handlers.BlockDispenseHandler;
@ -31,7 +32,6 @@ import io.github.thebusybiscuit.slimefun4.implementation.listeners.AncientAltarL
import io.github.thebusybiscuit.slimefun4.implementation.tasks.AncientAltarTask; import io.github.thebusybiscuit.slimefun4.implementation.tasks.AncientAltarTask;
import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
/** /**
* The {@link AncientPedestal} is a part of the {@link AncientAltar}. * The {@link AncientPedestal} is a part of the {@link AncientAltar}.
@ -51,7 +51,7 @@ public class AncientPedestal extends SimpleSlimefunItem<BlockDispenseHandler> {
public static final String ITEM_PREFIX = ChatColors.color("&dALTAR &3Probe - &e"); public static final String ITEM_PREFIX = ChatColors.color("&dALTAR &3Probe - &e");
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public AncientPedestal(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, ItemStack recipeOutput) { public AncientPedestal(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, ItemStack recipeOutput) {
super(category, item, recipeType, recipe, recipeOutput); super(category, item, recipeType, recipe, recipeOutput);
addItemHandler(onBreak()); addItemHandler(onBreak());

View File

@ -5,12 +5,12 @@ import javax.annotation.ParametersAreNonnullByDefault;
import org.bukkit.block.Dispenser; import org.bukkit.block.Dispenser;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.core.handlers.BlockDispenseHandler; import io.github.thebusybiscuit.slimefun4.core.handlers.BlockDispenseHandler;
import io.github.thebusybiscuit.slimefun4.implementation.handlers.VanillaInventoryDropHandler; import io.github.thebusybiscuit.slimefun4.implementation.handlers.VanillaInventoryDropHandler;
import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem; import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
/** /**
* The {@link AndroidInterface} are inventories used to interact with a {@link ProgrammableAndroid}. * The {@link AndroidInterface} are inventories used to interact with a {@link ProgrammableAndroid}.
@ -24,7 +24,7 @@ import me.mrCookieSlime.Slimefun.Objects.Category;
public class AndroidInterface extends SimpleSlimefunItem<BlockDispenseHandler> { public class AndroidInterface extends SimpleSlimefunItem<BlockDispenseHandler> {
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public AndroidInterface(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public AndroidInterface(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, item, recipeType, recipe); super(category, item, recipeType, recipe);
addItemHandler(new VanillaInventoryDropHandler<>(Dispenser.class)); addItemHandler(new VanillaInventoryDropHandler<>(Dispenser.class));

View File

@ -11,16 +11,16 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.metadata.FixedMetadataValue; import org.bukkit.metadata.FixedMetadataValue;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
public class ButcherAndroid extends ProgrammableAndroid { public class ButcherAndroid extends ProgrammableAndroid {
private static final String METADATA_KEY = "android_killer"; private static final String METADATA_KEY = "android_killer";
public ButcherAndroid(Category category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public ButcherAndroid(ItemGroup category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, tier, item, recipeType, recipe); super(category, tier, item, recipeType, recipe);
} }

View File

@ -14,16 +14,16 @@ import org.bukkit.block.data.BlockData;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.events.AndroidFarmEvent; import io.github.thebusybiscuit.slimefun4.api.events.AndroidFarmEvent;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
public class FarmerAndroid extends ProgrammableAndroid { public class FarmerAndroid extends ProgrammableAndroid {
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public FarmerAndroid(Category category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public FarmerAndroid(ItemGroup category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, tier, item, recipeType, recipe); super(category, tier, item, recipeType, recipe);
} }

View File

@ -10,17 +10,17 @@ import org.bukkit.block.BlockFace;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.cscorelib2.collections.RandomizedSet; import io.github.thebusybiscuit.cscorelib2.collections.RandomizedSet;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
public class FisherAndroid extends ProgrammableAndroid { public class FisherAndroid extends ProgrammableAndroid {
private final RandomizedSet<ItemStack> fishingLoot = new RandomizedSet<>(); private final RandomizedSet<ItemStack> fishingLoot = new RandomizedSet<>();
public FisherAndroid(Category category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public FisherAndroid(ItemGroup category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, tier, item, recipeType, recipe); super(category, tier, item, recipeType, recipe);
// Fish // Fish

View File

@ -18,13 +18,13 @@ import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.cscorelib2.protection.ProtectableAction; import io.github.thebusybiscuit.cscorelib2.protection.ProtectableAction;
import io.github.thebusybiscuit.slimefun4.api.events.AndroidMineEvent; import io.github.thebusybiscuit.slimefun4.api.events.AndroidMineEvent;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.ItemSetting; import io.github.thebusybiscuit.slimefun4.api.items.ItemSetting;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.utils.InfiniteBlockGenerator; import io.github.thebusybiscuit.slimefun4.utils.InfiniteBlockGenerator;
import io.github.thebusybiscuit.slimefun4.utils.tags.SlimefunTag; import io.github.thebusybiscuit.slimefun4.utils.tags.SlimefunTag;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
@ -57,7 +57,7 @@ public class MinerAndroid extends ProgrammableAndroid {
private final ItemSetting<Boolean> applyOptimizations = new ItemSetting<>(this, "reduced-block-updates", true); private final ItemSetting<Boolean> applyOptimizations = new ItemSetting<>(this, "reduced-block-updates", true);
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public MinerAndroid(Category category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public MinerAndroid(ItemGroup category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, tier, item, recipeType, recipe); super(category, tier, item, recipeType, recipe);
addItemSetting(firesEvent, applyOptimizations); addItemSetting(firesEvent, applyOptimizations);

View File

@ -36,6 +36,8 @@ import io.github.thebusybiscuit.cscorelib2.chat.ChatInput;
import io.github.thebusybiscuit.cscorelib2.inventory.ItemUtils; import io.github.thebusybiscuit.cscorelib2.inventory.ItemUtils;
import io.github.thebusybiscuit.cscorelib2.item.CustomItem; import io.github.thebusybiscuit.cscorelib2.item.CustomItem;
import io.github.thebusybiscuit.cscorelib2.skull.SkullBlock; import io.github.thebusybiscuit.cscorelib2.skull.SkullBlock;
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.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem; import io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem;
import io.github.thebusybiscuit.slimefun4.core.handlers.BlockBreakHandler; import io.github.thebusybiscuit.slimefun4.core.handlers.BlockBreakHandler;
@ -53,8 +55,6 @@ import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu;
import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu.AdvancedMenuClickHandler; import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu.AdvancedMenuClickHandler;
import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ClickAction; import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ClickAction;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.MachineFuel; import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.MachineFuel;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.interfaces.InventoryBlock; import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.interfaces.InventoryBlock;
import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker; import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker;
@ -76,7 +76,7 @@ public class ProgrammableAndroid extends SlimefunItem implements InventoryBlock,
private final int tier; private final int tier;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public ProgrammableAndroid(Category category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public ProgrammableAndroid(ItemGroup category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, item, recipeType, recipe); super(category, item, recipeType, recipe);
this.tier = tier; this.tier = tier;

View File

@ -19,11 +19,11 @@ import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.cscorelib2.blocks.Vein; import io.github.thebusybiscuit.cscorelib2.blocks.Vein;
import io.github.thebusybiscuit.cscorelib2.protection.ProtectableAction; import io.github.thebusybiscuit.cscorelib2.protection.ProtectableAction;
import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion; import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.utils.tags.SlimefunTag; import io.github.thebusybiscuit.slimefun4.utils.tags.SlimefunTag;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
@ -31,7 +31,7 @@ public class WoodcutterAndroid extends ProgrammableAndroid {
private static final int MAX_REACH = 160; private static final int MAX_REACH = 160;
public WoodcutterAndroid(Category category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public WoodcutterAndroid(ItemGroup category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, tier, item, recipeType, recipe); super(category, tier, item, recipeType, recipe);
} }

View File

@ -10,6 +10,7 @@ import org.bukkit.NamespacedKey;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.core.attributes.DamageableItem; import io.github.thebusybiscuit.slimefun4.core.attributes.DamageableItem;
import io.github.thebusybiscuit.slimefun4.core.attributes.ProtectionType; import io.github.thebusybiscuit.slimefun4.core.attributes.ProtectionType;
@ -17,7 +18,6 @@ import io.github.thebusybiscuit.slimefun4.core.attributes.ProtectiveArmor;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.implementation.listeners.ElytraImpactListener; import io.github.thebusybiscuit.slimefun4.implementation.listeners.ElytraImpactListener;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
/** /**
* The {@link ElytraCap} negates damage taken when crashing into a wall using an elytra. * The {@link ElytraCap} negates damage taken when crashing into a wall using an elytra.
@ -31,7 +31,7 @@ public class ElytraCap extends SlimefunArmorPiece implements DamageableItem, Pro
private final NamespacedKey key; private final NamespacedKey key;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public ElytraCap(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public ElytraCap(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, item, recipeType, recipe, null); super(category, item, recipeType, recipe, null);
key = new NamespacedKey(SlimefunPlugin.instance(), "elytra_armor"); key = new NamespacedKey(SlimefunPlugin.instance(), "elytra_armor");

View File

@ -5,11 +5,11 @@ import javax.annotation.ParametersAreNonnullByDefault;
import org.bukkit.entity.EnderPearl; import org.bukkit.entity.EnderPearl;
import org.bukkit.inventory.ItemStack; 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.items.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* {@link EnderBoots} are a pair of boots which negate damage caused * {@link EnderBoots} are a pair of boots which negate damage caused
@ -21,7 +21,7 @@ import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
public class EnderBoots extends SlimefunItem { public class EnderBoots extends SlimefunItem {
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public EnderBoots(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public EnderBoots(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, item, recipeType, recipe); super(category, item, recipeType, recipe);
} }

View File

@ -6,11 +6,11 @@ import org.bukkit.block.data.type.Farmland;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; 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.items.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* The {@link FarmerShoes} are just a simple pair of boots which allows a {@link Player} to walk * The {@link FarmerShoes} are just a simple pair of boots which allows a {@link Player} to walk
@ -22,7 +22,7 @@ import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
public class FarmerShoes extends SlimefunItem { public class FarmerShoes extends SlimefunItem {
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public FarmerShoes(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public FarmerShoes(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, item, recipeType, recipe); super(category, item, recipeType, recipe);
} }

View File

@ -7,11 +7,11 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffect;
import io.github.thebusybiscuit.slimefun4.core.attributes.ProtectiveArmor; import io.github.thebusybiscuit.slimefun4.core.attributes.ProtectiveArmor;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.core.attributes.ProtectionType; import io.github.thebusybiscuit.slimefun4.core.attributes.ProtectionType;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
/** /**
* Represents 1 {@link SlimefunArmorPiece} of the Hazmat armor set. * Represents 1 {@link SlimefunArmorPiece} of the Hazmat armor set.
@ -29,7 +29,7 @@ public class HazmatArmorPiece extends SlimefunArmorPiece implements ProtectiveAr
private final ProtectionType[] types; private final ProtectionType[] types;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public HazmatArmorPiece(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, PotionEffect[] effects) { public HazmatArmorPiece(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, PotionEffect[] effects) {
super(category, item, recipeType, recipe, effects); super(category, item, recipeType, recipe, effects);
types = new ProtectionType[] { ProtectionType.BEES, ProtectionType.RADIATION }; types = new ProtectionType[] { ProtectionType.BEES, ProtectionType.RADIATION };

View File

@ -5,10 +5,10 @@ import javax.annotation.ParametersAreNonnullByDefault;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffect;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
/** /**
* {@link LongFallBoots} are a pair of boots which negate fall damage. * {@link LongFallBoots} are a pair of boots which negate fall damage.
@ -22,7 +22,7 @@ import me.mrCookieSlime.Slimefun.Objects.Category;
public class LongFallBoots extends SlimefunArmorPiece { public class LongFallBoots extends SlimefunArmorPiece {
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public LongFallBoots(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, PotionEffect[] effects) { public LongFallBoots(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, PotionEffect[] effects) {
super(category, item, recipeType, recipe, effects); super(category, item, recipeType, recipe, effects);
} }

View File

@ -4,12 +4,12 @@ import javax.annotation.ParametersAreNonnullByDefault;
import org.bukkit.inventory.ItemStack; 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.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.implementation.items.electric.gadgets.Jetpack; import io.github.thebusybiscuit.slimefun4.implementation.items.electric.gadgets.Jetpack;
import io.github.thebusybiscuit.slimefun4.implementation.tasks.ParachuteTask; import io.github.thebusybiscuit.slimefun4.implementation.tasks.ParachuteTask;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* The {@link Parachute} is a {@link SlimefunItem} that can be equipped as a chestplate. * The {@link Parachute} is a {@link SlimefunItem} that can be equipped as a chestplate.
@ -27,7 +27,7 @@ import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
public class Parachute extends SlimefunItem { public class Parachute extends SlimefunItem {
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public Parachute(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public Parachute(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, item, RecipeType.ENHANCED_CRAFTING_TABLE, recipe); super(category, item, RecipeType.ENHANCED_CRAFTING_TABLE, recipe);
} }

View File

@ -7,18 +7,18 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffect;
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.items.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
public class SlimefunArmorPiece extends SlimefunItem { public class SlimefunArmorPiece extends SlimefunItem {
private final PotionEffect[] effects; private final PotionEffect[] effects;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public SlimefunArmorPiece(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, @Nullable PotionEffect[] effects) { public SlimefunArmorPiece(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, @Nullable PotionEffect[] effects) {
super(category, item, recipeType, recipe); super(category, item, recipeType, recipe);
this.effects = effects == null ? new PotionEffect[0] : effects; this.effects = effects == null ? new PotionEffect[0] : effects;

View File

@ -19,11 +19,11 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
import io.github.thebusybiscuit.cscorelib2.protection.ProtectableAction; import io.github.thebusybiscuit.cscorelib2.protection.ProtectableAction;
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.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
/** /**
* The Boots of the Stomper are boots which damage nearby enemies whenever the {@link Player} * The Boots of the Stomper are boots which damage nearby enemies whenever the {@link Player}
@ -35,7 +35,7 @@ import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
public class StomperBoots extends SlimefunItem { public class StomperBoots extends SlimefunItem {
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public StomperBoots(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public StomperBoots(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, item, recipeType, recipe); super(category, item, recipeType, recipe);
} }

View File

@ -30,7 +30,9 @@ import io.github.thebusybiscuit.cscorelib2.item.CustomItem;
import io.github.thebusybiscuit.cscorelib2.protection.ProtectableAction; import io.github.thebusybiscuit.cscorelib2.protection.ProtectableAction;
import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion; import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon; import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.ItemState; import io.github.thebusybiscuit.slimefun4.api.items.ItemState;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetComponent; import io.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetComponent;
import io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNetComponentType; import io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNetComponentType;
@ -45,8 +47,6 @@ import io.papermc.lib.features.blockstatesnapshot.BlockStateSnapshotResult;
import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config; import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config;
import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu; import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu;
import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AContainer; import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AContainer;
import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker; import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker;
@ -92,7 +92,7 @@ public abstract class AbstractAutoCrafter extends SlimefunItem implements Energy
// @formatter:on // @formatter:on
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
protected AbstractAutoCrafter(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { protected AbstractAutoCrafter(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, item, recipeType, recipe); super(category, item, recipeType, recipe);
recipeStorageKey = new NamespacedKey(SlimefunPlugin.instance(), "recipe_key"); recipeStorageKey = new NamespacedKey(SlimefunPlugin.instance(), "recipe_key");

Some files were not shown because too many files have changed in this diff Show More