diff --git a/pom.xml b/pom.xml
index d3592aa..e057380 100644
--- a/pom.xml
+++ b/pom.xml
@@ -101,12 +101,12 @@
com.github.Slimefun
Slimefun4
- RC-22
+ RC-27
provided
- io.github.thebusybiscuit
- cscorelib2
+ io.github.baked-libs
+ dough-api
diff --git a/src/main/java/io/github/thebusybiscuit/slimytreetaps/MagicalMirror.java b/src/main/java/io/github/thebusybiscuit/slimytreetaps/MagicalMirror.java
index 7544b4d..67d942b 100644
--- a/src/main/java/io/github/thebusybiscuit/slimytreetaps/MagicalMirror.java
+++ b/src/main/java/io/github/thebusybiscuit/slimytreetaps/MagicalMirror.java
@@ -17,21 +17,21 @@
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
+import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
+import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
+import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType;
import io.github.thebusybiscuit.slimefun4.core.attributes.NotPlaceable;
import io.github.thebusybiscuit.slimefun4.core.handlers.ItemUseHandler;
import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem;
import io.github.thebusybiscuit.slimefun4.libraries.paperlib.PaperLib;
import io.github.thebusybiscuit.slimefun4.utils.ChatUtils;
-import me.mrCookieSlime.Slimefun.Lists.RecipeType;
-import me.mrCookieSlime.Slimefun.Objects.Category;
-import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
public class MagicalMirror extends SimpleSlimefunItem implements NotPlaceable {
private final NamespacedKey mirrorLocation;
- public MagicalMirror(TreeTaps plugin, Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
- super(category, item, recipeType, recipe);
+ public MagicalMirror(TreeTaps plugin, ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
+ super(itemGroup, item, recipeType, recipe);
mirrorLocation = new NamespacedKey(plugin, "mirror_location");
}
diff --git a/src/main/java/io/github/thebusybiscuit/slimytreetaps/ResinExtractor.java b/src/main/java/io/github/thebusybiscuit/slimytreetaps/ResinExtractor.java
index 2c1c7ad..0744640 100644
--- a/src/main/java/io/github/thebusybiscuit/slimytreetaps/ResinExtractor.java
+++ b/src/main/java/io/github/thebusybiscuit/slimytreetaps/ResinExtractor.java
@@ -3,16 +3,16 @@
import org.bukkit.Material;
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.recipes.RecipeType;
import io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem;
-import me.mrCookieSlime.Slimefun.Lists.RecipeType;
-import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AContainer;
-import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
public abstract class ResinExtractor extends AContainer implements RecipeDisplayItem {
- public ResinExtractor(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
- super(category, item, recipeType, recipe);
+ public ResinExtractor(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
+ super(itemGroup, item, recipeType, recipe);
}
@Override
diff --git a/src/main/java/io/github/thebusybiscuit/slimytreetaps/RubberFactory.java b/src/main/java/io/github/thebusybiscuit/slimytreetaps/RubberFactory.java
index 97a3767..416b6e6 100644
--- a/src/main/java/io/github/thebusybiscuit/slimytreetaps/RubberFactory.java
+++ b/src/main/java/io/github/thebusybiscuit/slimytreetaps/RubberFactory.java
@@ -3,16 +3,16 @@
import org.bukkit.Material;
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.recipes.RecipeType;
import io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem;
-import me.mrCookieSlime.Slimefun.Lists.RecipeType;
-import me.mrCookieSlime.Slimefun.Objects.Category;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AContainer;
-import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
public abstract class RubberFactory extends AContainer implements RecipeDisplayItem {
- public RubberFactory(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
- super(category, item, recipeType, recipe);
+ public RubberFactory(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
+ super(itemGroup, item, recipeType, recipe);
}
@Override
diff --git a/src/main/java/io/github/thebusybiscuit/slimytreetaps/TreeTaps.java b/src/main/java/io/github/thebusybiscuit/slimytreetaps/TreeTaps.java
index bcc3444..3627d14 100644
--- a/src/main/java/io/github/thebusybiscuit/slimytreetaps/TreeTaps.java
+++ b/src/main/java/io/github/thebusybiscuit/slimytreetaps/TreeTaps.java
@@ -9,22 +9,22 @@
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.plugin.java.JavaPlugin;
+import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
+import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
+import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
+import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType;
+import io.github.thebusybiscuit.slimefun4.api.researches.Research;
import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
import io.github.thebusybiscuit.slimefun4.core.attributes.MachineTier;
import io.github.thebusybiscuit.slimefun4.core.attributes.MachineType;
-import io.github.thebusybiscuit.slimefun4.core.researching.Research;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
-import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.UnplaceableBlock;
+import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
+import io.github.thebusybiscuit.slimefun4.libraries.dough.config.Config;
+import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack;
+import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.GitHubBuildsUpdater;
import io.github.thebusybiscuit.slimefun4.utils.LoreBuilder;
-import me.mrCookieSlime.Slimefun.Lists.RecipeType;
-import me.mrCookieSlime.Slimefun.Objects.Category;
-import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
-import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
-import me.mrCookieSlime.Slimefun.cscorelib2.config.Config;
-import me.mrCookieSlime.Slimefun.cscorelib2.item.CustomItem;
-import me.mrCookieSlime.Slimefun.cscorelib2.updater.GitHubBuildsUpdater;
public class TreeTaps extends JavaPlugin implements SlimefunAddon {
@@ -54,50 +54,50 @@ public void onEnable() {
SlimefunItemStack resinExtractor2 = new SlimefunItemStack("RESIN_EXTRACTOR_2", Material.SMITHING_TABLE, "&cResin Extractor &7(&eII&7)", "", LoreBuilder.machine(MachineTier.END_GAME, MachineType.MACHINE), "&8\u21E8 &7Speed: 2x", "&8\u21E8 &e\u26A1 &756 J/s");
SlimefunItemStack amber = new SlimefunItemStack("AMBER", "ac7f7b72fc3e733828fcccc0ca8278aca2633aa33a231c93a682d14ac54aa0c4", "&6Amber", "", "&eA hardened gem acquired from Resin");
- SlimefunItemStack amberBlock = new SlimefunItemStack("AMBER_BLOCK", SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16) ? Material.SHROOMLIGHT: Material.GLOWSTONE, "&6Block of Amber");
+ SlimefunItemStack amberBlock = new SlimefunItemStack("AMBER_BLOCK", Slimefun.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16) ? Material.SHROOMLIGHT: Material.GLOWSTONE, "&6Block of Amber");
SlimefunItemStack blueEnderPearl = new SlimefunItemStack("BLUE_ENDER_PEARL", "38be8abd66d09a58ce12d377544d726d25cad7e979e8c2481866be94d3b32f", "&9Blue Ender Pearl", "", "&7This item can be used to", "&7craft Magical Mirrors");
SlimefunItemStack magicalMirror = new SlimefunItemStack("MAGICAL_MIRROR", Material.BLUE_STAINED_GLASS_PANE, "&9Magical Mirror &7(Unbound)", "", "&eRight Click &7to bind this Mirror", "&7to your current location.", "", "&7Place a bound mirror into an", "&7Item Frame and then click on", "&7that Item Frame to teleport.", "&7Teleports cost &b1 Ender Pearl");
- Category category = new Category(new NamespacedKey(this, "tree_taps"), new CustomItem(treeTap, "&6Slimy TreeTaps", "", "&a> Click to open"));
+ ItemGroup itemGroup = new ItemGroup(new NamespacedKey(this, "tree_taps"), new CustomItemStack(treeTap, "&6Slimy TreeTaps", "", "&a> Click to open"));
RecipeType rubberFactoryType = new RecipeType(new NamespacedKey(this, "rubber_factory"), rubberFactory);
- new TreeTool(category, treeTap, cfg.getInt("resin-chance.standard"), stickyResin,
+ new TreeTool(itemGroup, treeTap, cfg.getInt("resin-chance.standard"), stickyResin,
new ItemStack[] {
null, SlimefunItems.DAMASCUS_STEEL_INGOT, new ItemStack(Material.OAK_LOG),
SlimefunItems.DAMASCUS_STEEL_INGOT, new ItemStack(Material.OAK_LOG), null,
new ItemStack(Material.OAK_LOG), null, new ItemStack(Material.BOWL)
}).register(this);
- new TreeTool(category, reinforcedTreeTap, cfg.getInt("resin-chance.reinforced"), stickyResin,
+ new TreeTool(itemGroup, reinforcedTreeTap, cfg.getInt("resin-chance.reinforced"), stickyResin,
new ItemStack[] {
null, SlimefunItems.HARDENED_METAL_INGOT, new ItemStack(Material.OAK_LOG),
SlimefunItems.HARDENED_METAL_INGOT, treeTap, null,
new ItemStack(Material.OAK_LOG), null, SlimefunItems.COBALT_INGOT
}).register(this);
- new TreeTool(category, diamondTreeTap, cfg.getInt("resin-chance.diamond"), stickyResin,
+ new TreeTool(itemGroup, diamondTreeTap, cfg.getInt("resin-chance.diamond"), stickyResin,
new ItemStack[] {
null, new ItemStack(Material.DIAMOND), new ItemStack(Material.OAK_LOG),
new ItemStack(Material.DIAMOND), reinforcedTreeTap, null,
new ItemStack(Material.OAK_LOG), null, SlimefunItems.CARBONADO
}).register(this);
- new TreeTool(category, treeScraper, cfg.getInt("amber-chance"), amber,
+ new TreeTool(itemGroup, treeScraper, cfg.getInt("amber-chance"), amber,
new ItemStack[] {
null, new ItemStack(Material.GOLD_INGOT), null,
new ItemStack(Material.GOLD_INGOT), treeTap, null,
null, null, SlimefunItems.BRONZE_INGOT
}).register(this);
- new SlimefunItem(category, stickyResin, new RecipeType(new NamespacedKey(this, "tree_tap"), treeTap),
+ new SlimefunItem(itemGroup, stickyResin, new RecipeType(new NamespacedKey(this, "tree_tap"), treeTap),
new ItemStack[] {
null, null, null,
null, new ItemStack(Material.OAK_LOG), null,
null, null, null
}).register(this);
- new RubberFactory(category, rubberFactory, RecipeType.ENHANCED_CRAFTING_TABLE,
+ new RubberFactory(itemGroup, rubberFactory, RecipeType.ENHANCED_CRAFTING_TABLE,
new ItemStack[] {
null, SlimefunItems.HEATING_COIL, null,
SlimefunItems.SOLDER_INGOT, SlimefunItems.ELECTRIC_FURNACE_2, SlimefunItems.SOLDER_INGOT,
@@ -106,8 +106,8 @@ null, new ItemStack(Material.OAK_LOG), null,
@Override
public void registerDefaultRecipes() {
- registerRecipe(4, new ItemStack[] {new CustomItem(stickyResin, 2)}, new ItemStack[] {rubber});
- registerRecipe(6, new ItemStack[] {new CustomItem(rubber, 2)}, new ItemStack[] {rawPlastic});
+ registerRecipe(4, new ItemStack[] {new CustomItemStack(stickyResin, 2)}, new ItemStack[] {rubber});
+ registerRecipe(6, new ItemStack[] {new CustomItemStack(rubber, 2)}, new ItemStack[] {rawPlastic});
registerRecipe(10, new ItemStack[] {rawPlastic}, new ItemStack[] {SlimefunItems.PLASTIC_SHEET});
}
@@ -123,7 +123,7 @@ public int getSpeed() {
}.register(this);
- new ResinExtractor(category, resinExtractor, RecipeType.ENHANCED_CRAFTING_TABLE,
+ new ResinExtractor(itemGroup, resinExtractor, RecipeType.ENHANCED_CRAFTING_TABLE,
new ItemStack[] {
null, diamondTreeTap, null,
SlimefunItems.GOLD_24K, SlimefunItems.CARBONADO, SlimefunItems.GOLD_24K,
@@ -156,7 +156,7 @@ public int getCapacity() {
}.register(this);
- new ResinExtractor(category, resinExtractor2, RecipeType.ENHANCED_CRAFTING_TABLE,
+ new ResinExtractor(itemGroup, resinExtractor2, RecipeType.ENHANCED_CRAFTING_TABLE,
new ItemStack[] {
SlimefunItems.REINFORCED_ALLOY_INGOT, diamondTreeTap, SlimefunItems.REINFORCED_ALLOY_INGOT,
SlimefunItems.GOLD_24K, SlimefunItems.CARBONADO, SlimefunItems.GOLD_24K,
@@ -189,42 +189,42 @@ public int getCapacity() {
}.register(this);
- new SlimefunItem(category, rawPlastic, rubberFactoryType,
+ new SlimefunItem(itemGroup, rawPlastic, rubberFactoryType,
new ItemStack[] {
null, null, null,
null, new SlimefunItemStack(rubber, 2), null,
null, null, null
}).register(this);
- new SlimefunItem(category, rubber, rubberFactoryType,
+ new SlimefunItem(itemGroup, rubber, rubberFactoryType,
new ItemStack[] {
null, null, null,
null, stickyResin, null,
null, null, null
}).register(this);
- new SlimefunItem(category, amber, RecipeType.SMELTERY,
+ new SlimefunItem(itemGroup, amber, RecipeType.SMELTERY,
new ItemStack[] {
new SlimefunItemStack(stickyResin, 4), null, null,
null, null, null,
null, null, null
}).register(this);
- new SlimefunItem(category, amberBlock, RecipeType.ENHANCED_CRAFTING_TABLE,
+ new SlimefunItem(itemGroup, amberBlock, RecipeType.ENHANCED_CRAFTING_TABLE,
new ItemStack[] {
amber, amber, amber,
amber, amber, amber,
amber, amber, amber
}).register(this);
- new UnplaceableBlock(category, blueEnderPearl, RecipeType.ENHANCED_CRAFTING_TABLE,
+ new UnplaceableBlock(itemGroup, blueEnderPearl, RecipeType.ENHANCED_CRAFTING_TABLE,
new ItemStack[] {
new ItemStack(Material.LAPIS_BLOCK), amberBlock, new ItemStack(Material.LAPIS_BLOCK),
amberBlock, new ItemStack(Material.ENDER_PEARL), amberBlock,
new ItemStack(Material.LAPIS_BLOCK), amberBlock, new ItemStack(Material.LAPIS_BLOCK)
}).register(this);
- MagicalMirror mirror = new MagicalMirror(this, category, magicalMirror, RecipeType.ENHANCED_CRAFTING_TABLE,
+ MagicalMirror mirror = new MagicalMirror(this, itemGroup, magicalMirror, RecipeType.ENHANCED_CRAFTING_TABLE,
new ItemStack[] {
new ItemStack(Material.GLASS), amber, new ItemStack(Material.GLASS),
amber, blueEnderPearl, amber,
diff --git a/src/main/java/io/github/thebusybiscuit/slimytreetaps/TreeTool.java b/src/main/java/io/github/thebusybiscuit/slimytreetaps/TreeTool.java
index a44fb39..6474532 100644
--- a/src/main/java/io/github/thebusybiscuit/slimytreetaps/TreeTool.java
+++ b/src/main/java/io/github/thebusybiscuit/slimytreetaps/TreeTool.java
@@ -10,24 +10,24 @@
import org.bukkit.entity.Player;
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.recipes.RecipeType;
import io.github.thebusybiscuit.slimefun4.core.attributes.DamageableItem;
import io.github.thebusybiscuit.slimefun4.core.attributes.NotPlaceable;
import io.github.thebusybiscuit.slimefun4.core.handlers.ItemUseHandler;
-import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
+import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem;
-import me.mrCookieSlime.Slimefun.Lists.RecipeType;
-import me.mrCookieSlime.Slimefun.Objects.Category;
+import io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction;
import me.mrCookieSlime.Slimefun.api.BlockStorage;
-import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
-import me.mrCookieSlime.Slimefun.cscorelib2.protection.ProtectableAction;
public class TreeTool extends SimpleSlimefunItem implements NotPlaceable, DamageableItem {
private final int chance;
private final SlimefunItemStack output;
- public TreeTool(Category category, SlimefunItemStack item, int chance, SlimefunItemStack output, ItemStack[] recipe) {
- super(category, item, RecipeType.ENHANCED_CRAFTING_TABLE, recipe);
+ public TreeTool(ItemGroup itemGroup, SlimefunItemStack item, int chance, SlimefunItemStack output, ItemStack[] recipe) {
+ super(itemGroup, item, RecipeType.ENHANCED_CRAFTING_TABLE, recipe);
this.chance = chance;
this.output = output;
@@ -40,7 +40,7 @@ public ItemUseHandler getItemHandler() {
Player p = e.getPlayer();
Block b = e.getClickedBlock().get();
- if (isLog(b) && SlimefunPlugin.getProtectionManager().hasPermission(p, b, ProtectableAction.BREAK_BLOCK)) {
+ if (isLog(b) && Slimefun.getProtectionManager().hasPermission(p, b, Interaction.BREAK_BLOCK)) {
p.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, b.getType());
if (ThreadLocalRandom.current().nextInt(100) < chance) {