Skip to content

Commit 963f038

Browse files
Merge pull request #20 from variananora/rc-27-update
Update to RC-27
2 parents 69930ef + 91c4e13 commit 963f038

File tree

6 files changed

+53
-53
lines changed

6 files changed

+53
-53
lines changed

pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@
101101
<dependency>
102102
<groupId>com.github.Slimefun</groupId>
103103
<artifactId>Slimefun4</artifactId>
104-
<version>RC-22</version>
104+
<version>RC-27</version>
105105
<scope>provided</scope>
106106
<exclusions>
107107
<exclusion>
108-
<groupId>io.github.thebusybiscuit</groupId>
109-
<artifactId>cscorelib2</artifactId>
108+
<groupId>io.github.baked-libs</groupId>
109+
<artifactId>dough-api</artifactId>
110110
</exclusion>
111111
</exclusions>
112112
</dependency>

src/main/java/io/github/thebusybiscuit/slimytreetaps/MagicalMirror.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@
1717
import com.google.gson.JsonObject;
1818
import com.google.gson.JsonParser;
1919

20+
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
21+
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
22+
import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType;
2023
import io.github.thebusybiscuit.slimefun4.core.attributes.NotPlaceable;
2124
import io.github.thebusybiscuit.slimefun4.core.handlers.ItemUseHandler;
2225
import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem;
2326
import io.github.thebusybiscuit.slimefun4.libraries.paperlib.PaperLib;
2427
import io.github.thebusybiscuit.slimefun4.utils.ChatUtils;
25-
import me.mrCookieSlime.Slimefun.Lists.RecipeType;
26-
import me.mrCookieSlime.Slimefun.Objects.Category;
27-
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
2828

2929
public class MagicalMirror extends SimpleSlimefunItem<ItemUseHandler> implements NotPlaceable {
3030

3131
private final NamespacedKey mirrorLocation;
3232

33-
public MagicalMirror(TreeTaps plugin, Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
34-
super(category, item, recipeType, recipe);
33+
public MagicalMirror(TreeTaps plugin, ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
34+
super(itemGroup, item, recipeType, recipe);
3535
mirrorLocation = new NamespacedKey(plugin, "mirror_location");
3636
}
3737

src/main/java/io/github/thebusybiscuit/slimytreetaps/ResinExtractor.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
import org.bukkit.Material;
44
import org.bukkit.inventory.ItemStack;
55

6+
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
7+
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
8+
import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType;
69
import io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem;
7-
import me.mrCookieSlime.Slimefun.Lists.RecipeType;
8-
import me.mrCookieSlime.Slimefun.Objects.Category;
910
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AContainer;
10-
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
1111

1212
public abstract class ResinExtractor extends AContainer implements RecipeDisplayItem {
1313

14-
public ResinExtractor(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
15-
super(category, item, recipeType, recipe);
14+
public ResinExtractor(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
15+
super(itemGroup, item, recipeType, recipe);
1616
}
1717

1818
@Override

src/main/java/io/github/thebusybiscuit/slimytreetaps/RubberFactory.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
import org.bukkit.Material;
44
import org.bukkit.inventory.ItemStack;
55

6+
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
7+
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
8+
import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType;
69
import io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem;
7-
import me.mrCookieSlime.Slimefun.Lists.RecipeType;
8-
import me.mrCookieSlime.Slimefun.Objects.Category;
910
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AContainer;
10-
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
1111

1212
public abstract class RubberFactory extends AContainer implements RecipeDisplayItem {
1313

14-
public RubberFactory(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
15-
super(category, item, recipeType, recipe);
14+
public RubberFactory(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
15+
super(itemGroup, item, recipeType, recipe);
1616
}
1717

1818
@Override

src/main/java/io/github/thebusybiscuit/slimytreetaps/TreeTaps.java

+27-27
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99
import org.bukkit.inventory.meta.ItemMeta;
1010
import org.bukkit.plugin.java.JavaPlugin;
1111

12+
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
13+
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
14+
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
15+
import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType;
16+
import io.github.thebusybiscuit.slimefun4.api.researches.Research;
1217
import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion;
1318
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
1419
import io.github.thebusybiscuit.slimefun4.core.attributes.MachineTier;
1520
import io.github.thebusybiscuit.slimefun4.core.attributes.MachineType;
16-
import io.github.thebusybiscuit.slimefun4.core.researching.Research;
1721
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
18-
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
1922
import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.UnplaceableBlock;
23+
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
24+
import io.github.thebusybiscuit.slimefun4.libraries.dough.config.Config;
25+
import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack;
26+
import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.GitHubBuildsUpdater;
2027
import io.github.thebusybiscuit.slimefun4.utils.LoreBuilder;
21-
import me.mrCookieSlime.Slimefun.Lists.RecipeType;
22-
import me.mrCookieSlime.Slimefun.Objects.Category;
23-
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
24-
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
25-
import me.mrCookieSlime.Slimefun.cscorelib2.config.Config;
26-
import me.mrCookieSlime.Slimefun.cscorelib2.item.CustomItem;
27-
import me.mrCookieSlime.Slimefun.cscorelib2.updater.GitHubBuildsUpdater;
2828

2929
public class TreeTaps extends JavaPlugin implements SlimefunAddon {
3030

@@ -54,50 +54,50 @@ public void onEnable() {
5454
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");
5555

5656
SlimefunItemStack amber = new SlimefunItemStack("AMBER", "ac7f7b72fc3e733828fcccc0ca8278aca2633aa33a231c93a682d14ac54aa0c4", "&6Amber", "", "&eA hardened gem acquired from Resin");
57-
SlimefunItemStack amberBlock = new SlimefunItemStack("AMBER_BLOCK", SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16) ? Material.SHROOMLIGHT: Material.GLOWSTONE, "&6Block of Amber");
57+
SlimefunItemStack amberBlock = new SlimefunItemStack("AMBER_BLOCK", Slimefun.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16) ? Material.SHROOMLIGHT: Material.GLOWSTONE, "&6Block of Amber");
5858

5959
SlimefunItemStack blueEnderPearl = new SlimefunItemStack("BLUE_ENDER_PEARL", "38be8abd66d09a58ce12d377544d726d25cad7e979e8c2481866be94d3b32f", "&9Blue Ender Pearl", "", "&7This item can be used to", "&7craft Magical Mirrors");
6060
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");
6161

62-
Category category = new Category(new NamespacedKey(this, "tree_taps"), new CustomItem(treeTap, "&6Slimy TreeTaps", "", "&a> Click to open"));
62+
ItemGroup itemGroup = new ItemGroup(new NamespacedKey(this, "tree_taps"), new CustomItemStack(treeTap, "&6Slimy TreeTaps", "", "&a> Click to open"));
6363
RecipeType rubberFactoryType = new RecipeType(new NamespacedKey(this, "rubber_factory"), rubberFactory);
6464

65-
new TreeTool(category, treeTap, cfg.getInt("resin-chance.standard"), stickyResin,
65+
new TreeTool(itemGroup, treeTap, cfg.getInt("resin-chance.standard"), stickyResin,
6666
new ItemStack[] {
6767
null, SlimefunItems.DAMASCUS_STEEL_INGOT, new ItemStack(Material.OAK_LOG),
6868
SlimefunItems.DAMASCUS_STEEL_INGOT, new ItemStack(Material.OAK_LOG), null,
6969
new ItemStack(Material.OAK_LOG), null, new ItemStack(Material.BOWL)
7070
}).register(this);
7171

72-
new TreeTool(category, reinforcedTreeTap, cfg.getInt("resin-chance.reinforced"), stickyResin,
72+
new TreeTool(itemGroup, reinforcedTreeTap, cfg.getInt("resin-chance.reinforced"), stickyResin,
7373
new ItemStack[] {
7474
null, SlimefunItems.HARDENED_METAL_INGOT, new ItemStack(Material.OAK_LOG),
7575
SlimefunItems.HARDENED_METAL_INGOT, treeTap, null,
7676
new ItemStack(Material.OAK_LOG), null, SlimefunItems.COBALT_INGOT
7777
}).register(this);
7878

79-
new TreeTool(category, diamondTreeTap, cfg.getInt("resin-chance.diamond"), stickyResin,
79+
new TreeTool(itemGroup, diamondTreeTap, cfg.getInt("resin-chance.diamond"), stickyResin,
8080
new ItemStack[] {
8181
null, new ItemStack(Material.DIAMOND), new ItemStack(Material.OAK_LOG),
8282
new ItemStack(Material.DIAMOND), reinforcedTreeTap, null,
8383
new ItemStack(Material.OAK_LOG), null, SlimefunItems.CARBONADO
8484
}).register(this);
8585

86-
new TreeTool(category, treeScraper, cfg.getInt("amber-chance"), amber,
86+
new TreeTool(itemGroup, treeScraper, cfg.getInt("amber-chance"), amber,
8787
new ItemStack[] {
8888
null, new ItemStack(Material.GOLD_INGOT), null,
8989
new ItemStack(Material.GOLD_INGOT), treeTap, null,
9090
null, null, SlimefunItems.BRONZE_INGOT
9191
}).register(this);
9292

93-
new SlimefunItem(category, stickyResin, new RecipeType(new NamespacedKey(this, "tree_tap"), treeTap),
93+
new SlimefunItem(itemGroup, stickyResin, new RecipeType(new NamespacedKey(this, "tree_tap"), treeTap),
9494
new ItemStack[] {
9595
null, null, null,
9696
null, new ItemStack(Material.OAK_LOG), null,
9797
null, null, null
9898
}).register(this);
9999

100-
new RubberFactory(category, rubberFactory, RecipeType.ENHANCED_CRAFTING_TABLE,
100+
new RubberFactory(itemGroup, rubberFactory, RecipeType.ENHANCED_CRAFTING_TABLE,
101101
new ItemStack[] {
102102
null, SlimefunItems.HEATING_COIL, null,
103103
SlimefunItems.SOLDER_INGOT, SlimefunItems.ELECTRIC_FURNACE_2, SlimefunItems.SOLDER_INGOT,
@@ -106,8 +106,8 @@ null, new ItemStack(Material.OAK_LOG), null,
106106

107107
@Override
108108
public void registerDefaultRecipes() {
109-
registerRecipe(4, new ItemStack[] {new CustomItem(stickyResin, 2)}, new ItemStack[] {rubber});
110-
registerRecipe(6, new ItemStack[] {new CustomItem(rubber, 2)}, new ItemStack[] {rawPlastic});
109+
registerRecipe(4, new ItemStack[] {new CustomItemStack(stickyResin, 2)}, new ItemStack[] {rubber});
110+
registerRecipe(6, new ItemStack[] {new CustomItemStack(rubber, 2)}, new ItemStack[] {rawPlastic});
111111
registerRecipe(10, new ItemStack[] {rawPlastic}, new ItemStack[] {SlimefunItems.PLASTIC_SHEET});
112112
}
113113

@@ -123,7 +123,7 @@ public int getSpeed() {
123123

124124
}.register(this);
125125

126-
new ResinExtractor(category, resinExtractor, RecipeType.ENHANCED_CRAFTING_TABLE,
126+
new ResinExtractor(itemGroup, resinExtractor, RecipeType.ENHANCED_CRAFTING_TABLE,
127127
new ItemStack[] {
128128
null, diamondTreeTap, null,
129129
SlimefunItems.GOLD_24K, SlimefunItems.CARBONADO, SlimefunItems.GOLD_24K,
@@ -156,7 +156,7 @@ public int getCapacity() {
156156

157157
}.register(this);
158158

159-
new ResinExtractor(category, resinExtractor2, RecipeType.ENHANCED_CRAFTING_TABLE,
159+
new ResinExtractor(itemGroup, resinExtractor2, RecipeType.ENHANCED_CRAFTING_TABLE,
160160
new ItemStack[] {
161161
SlimefunItems.REINFORCED_ALLOY_INGOT, diamondTreeTap, SlimefunItems.REINFORCED_ALLOY_INGOT,
162162
SlimefunItems.GOLD_24K, SlimefunItems.CARBONADO, SlimefunItems.GOLD_24K,
@@ -189,42 +189,42 @@ public int getCapacity() {
189189

190190
}.register(this);
191191

192-
new SlimefunItem(category, rawPlastic, rubberFactoryType,
192+
new SlimefunItem(itemGroup, rawPlastic, rubberFactoryType,
193193
new ItemStack[] {
194194
null, null, null,
195195
null, new SlimefunItemStack(rubber, 2), null,
196196
null, null, null
197197
}).register(this);
198198

199-
new SlimefunItem(category, rubber, rubberFactoryType,
199+
new SlimefunItem(itemGroup, rubber, rubberFactoryType,
200200
new ItemStack[] {
201201
null, null, null,
202202
null, stickyResin, null,
203203
null, null, null
204204
}).register(this);
205205

206-
new SlimefunItem(category, amber, RecipeType.SMELTERY,
206+
new SlimefunItem(itemGroup, amber, RecipeType.SMELTERY,
207207
new ItemStack[] {
208208
new SlimefunItemStack(stickyResin, 4), null, null,
209209
null, null, null,
210210
null, null, null
211211
}).register(this);
212212

213-
new SlimefunItem(category, amberBlock, RecipeType.ENHANCED_CRAFTING_TABLE,
213+
new SlimefunItem(itemGroup, amberBlock, RecipeType.ENHANCED_CRAFTING_TABLE,
214214
new ItemStack[] {
215215
amber, amber, amber,
216216
amber, amber, amber,
217217
amber, amber, amber
218218
}).register(this);
219219

220-
new UnplaceableBlock(category, blueEnderPearl, RecipeType.ENHANCED_CRAFTING_TABLE,
220+
new UnplaceableBlock(itemGroup, blueEnderPearl, RecipeType.ENHANCED_CRAFTING_TABLE,
221221
new ItemStack[] {
222222
new ItemStack(Material.LAPIS_BLOCK), amberBlock, new ItemStack(Material.LAPIS_BLOCK),
223223
amberBlock, new ItemStack(Material.ENDER_PEARL), amberBlock,
224224
new ItemStack(Material.LAPIS_BLOCK), amberBlock, new ItemStack(Material.LAPIS_BLOCK)
225225
}).register(this);
226226

227-
MagicalMirror mirror = new MagicalMirror(this, category, magicalMirror, RecipeType.ENHANCED_CRAFTING_TABLE,
227+
MagicalMirror mirror = new MagicalMirror(this, itemGroup, magicalMirror, RecipeType.ENHANCED_CRAFTING_TABLE,
228228
new ItemStack[] {
229229
new ItemStack(Material.GLASS), amber, new ItemStack(Material.GLASS),
230230
amber, blueEnderPearl, amber,

src/main/java/io/github/thebusybiscuit/slimytreetaps/TreeTool.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,24 @@
1010
import org.bukkit.entity.Player;
1111
import org.bukkit.inventory.ItemStack;
1212

13+
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
14+
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
15+
import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType;
1316
import io.github.thebusybiscuit.slimefun4.core.attributes.DamageableItem;
1417
import io.github.thebusybiscuit.slimefun4.core.attributes.NotPlaceable;
1518
import io.github.thebusybiscuit.slimefun4.core.handlers.ItemUseHandler;
16-
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
19+
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
1720
import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem;
18-
import me.mrCookieSlime.Slimefun.Lists.RecipeType;
19-
import me.mrCookieSlime.Slimefun.Objects.Category;
21+
import io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction;
2022
import me.mrCookieSlime.Slimefun.api.BlockStorage;
21-
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
22-
import me.mrCookieSlime.Slimefun.cscorelib2.protection.ProtectableAction;
2323

2424
public class TreeTool extends SimpleSlimefunItem<ItemUseHandler> implements NotPlaceable, DamageableItem {
2525

2626
private final int chance;
2727
private final SlimefunItemStack output;
2828

29-
public TreeTool(Category category, SlimefunItemStack item, int chance, SlimefunItemStack output, ItemStack[] recipe) {
30-
super(category, item, RecipeType.ENHANCED_CRAFTING_TABLE, recipe);
29+
public TreeTool(ItemGroup itemGroup, SlimefunItemStack item, int chance, SlimefunItemStack output, ItemStack[] recipe) {
30+
super(itemGroup, item, RecipeType.ENHANCED_CRAFTING_TABLE, recipe);
3131

3232
this.chance = chance;
3333
this.output = output;
@@ -40,7 +40,7 @@ public ItemUseHandler getItemHandler() {
4040
Player p = e.getPlayer();
4141
Block b = e.getClickedBlock().get();
4242

43-
if (isLog(b) && SlimefunPlugin.getProtectionManager().hasPermission(p, b, ProtectableAction.BREAK_BLOCK)) {
43+
if (isLog(b) && Slimefun.getProtectionManager().hasPermission(p, b, Interaction.BREAK_BLOCK)) {
4444
p.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, b.getType());
4545

4646
if (ThreadLocalRandom.current().nextInt(100) < chance) {

0 commit comments

Comments
 (0)