99import org .bukkit .inventory .meta .ItemMeta ;
1010import 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 ;
1217import io .github .thebusybiscuit .slimefun4 .api .MinecraftVersion ;
1318import io .github .thebusybiscuit .slimefun4 .api .SlimefunAddon ;
1419import io .github .thebusybiscuit .slimefun4 .core .attributes .MachineTier ;
1520import io .github .thebusybiscuit .slimefun4 .core .attributes .MachineType ;
16- import io .github .thebusybiscuit .slimefun4 .core .researching .Research ;
1721import io .github .thebusybiscuit .slimefun4 .implementation .SlimefunItems ;
18- import io .github .thebusybiscuit .slimefun4 .implementation .SlimefunPlugin ;
1922import 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 ;
2027import 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
2929public 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 ,
0 commit comments