9
9
import org .bukkit .inventory .meta .ItemMeta ;
10
10
import org .bukkit .plugin .java .JavaPlugin ;
11
11
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 ;
12
17
import io .github .thebusybiscuit .slimefun4 .api .MinecraftVersion ;
13
18
import io .github .thebusybiscuit .slimefun4 .api .SlimefunAddon ;
14
19
import io .github .thebusybiscuit .slimefun4 .core .attributes .MachineTier ;
15
20
import io .github .thebusybiscuit .slimefun4 .core .attributes .MachineType ;
16
- import io .github .thebusybiscuit .slimefun4 .core .researching .Research ;
17
21
import io .github .thebusybiscuit .slimefun4 .implementation .SlimefunItems ;
18
- import io .github .thebusybiscuit .slimefun4 .implementation .SlimefunPlugin ;
19
22
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 ;
20
27
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 ;
28
28
29
29
public class TreeTaps extends JavaPlugin implements SlimefunAddon {
30
30
@@ -54,50 +54,50 @@ public void onEnable() {
54
54
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" );
55
55
56
56
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" );
58
58
59
59
SlimefunItemStack blueEnderPearl = new SlimefunItemStack ("BLUE_ENDER_PEARL" , "38be8abd66d09a58ce12d377544d726d25cad7e979e8c2481866be94d3b32f" , "&9Blue Ender Pearl" , "" , "&7This item can be used to" , "&7craft Magical Mirrors" );
60
60
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" );
61
61
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" ));
63
63
RecipeType rubberFactoryType = new RecipeType (new NamespacedKey (this , "rubber_factory" ), rubberFactory );
64
64
65
- new TreeTool (category , treeTap , cfg .getInt ("resin-chance.standard" ), stickyResin ,
65
+ new TreeTool (itemGroup , treeTap , cfg .getInt ("resin-chance.standard" ), stickyResin ,
66
66
new ItemStack [] {
67
67
null , SlimefunItems .DAMASCUS_STEEL_INGOT , new ItemStack (Material .OAK_LOG ),
68
68
SlimefunItems .DAMASCUS_STEEL_INGOT , new ItemStack (Material .OAK_LOG ), null ,
69
69
new ItemStack (Material .OAK_LOG ), null , new ItemStack (Material .BOWL )
70
70
}).register (this );
71
71
72
- new TreeTool (category , reinforcedTreeTap , cfg .getInt ("resin-chance.reinforced" ), stickyResin ,
72
+ new TreeTool (itemGroup , reinforcedTreeTap , cfg .getInt ("resin-chance.reinforced" ), stickyResin ,
73
73
new ItemStack [] {
74
74
null , SlimefunItems .HARDENED_METAL_INGOT , new ItemStack (Material .OAK_LOG ),
75
75
SlimefunItems .HARDENED_METAL_INGOT , treeTap , null ,
76
76
new ItemStack (Material .OAK_LOG ), null , SlimefunItems .COBALT_INGOT
77
77
}).register (this );
78
78
79
- new TreeTool (category , diamondTreeTap , cfg .getInt ("resin-chance.diamond" ), stickyResin ,
79
+ new TreeTool (itemGroup , diamondTreeTap , cfg .getInt ("resin-chance.diamond" ), stickyResin ,
80
80
new ItemStack [] {
81
81
null , new ItemStack (Material .DIAMOND ), new ItemStack (Material .OAK_LOG ),
82
82
new ItemStack (Material .DIAMOND ), reinforcedTreeTap , null ,
83
83
new ItemStack (Material .OAK_LOG ), null , SlimefunItems .CARBONADO
84
84
}).register (this );
85
85
86
- new TreeTool (category , treeScraper , cfg .getInt ("amber-chance" ), amber ,
86
+ new TreeTool (itemGroup , treeScraper , cfg .getInt ("amber-chance" ), amber ,
87
87
new ItemStack [] {
88
88
null , new ItemStack (Material .GOLD_INGOT ), null ,
89
89
new ItemStack (Material .GOLD_INGOT ), treeTap , null ,
90
90
null , null , SlimefunItems .BRONZE_INGOT
91
91
}).register (this );
92
92
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 ),
94
94
new ItemStack [] {
95
95
null , null , null ,
96
96
null , new ItemStack (Material .OAK_LOG ), null ,
97
97
null , null , null
98
98
}).register (this );
99
99
100
- new RubberFactory (category , rubberFactory , RecipeType .ENHANCED_CRAFTING_TABLE ,
100
+ new RubberFactory (itemGroup , rubberFactory , RecipeType .ENHANCED_CRAFTING_TABLE ,
101
101
new ItemStack [] {
102
102
null , SlimefunItems .HEATING_COIL , null ,
103
103
SlimefunItems .SOLDER_INGOT , SlimefunItems .ELECTRIC_FURNACE_2 , SlimefunItems .SOLDER_INGOT ,
@@ -106,8 +106,8 @@ null, new ItemStack(Material.OAK_LOG), null,
106
106
107
107
@ Override
108
108
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 });
111
111
registerRecipe (10 , new ItemStack [] {rawPlastic }, new ItemStack [] {SlimefunItems .PLASTIC_SHEET });
112
112
}
113
113
@@ -123,7 +123,7 @@ public int getSpeed() {
123
123
124
124
}.register (this );
125
125
126
- new ResinExtractor (category , resinExtractor , RecipeType .ENHANCED_CRAFTING_TABLE ,
126
+ new ResinExtractor (itemGroup , resinExtractor , RecipeType .ENHANCED_CRAFTING_TABLE ,
127
127
new ItemStack [] {
128
128
null , diamondTreeTap , null ,
129
129
SlimefunItems .GOLD_24K , SlimefunItems .CARBONADO , SlimefunItems .GOLD_24K ,
@@ -156,7 +156,7 @@ public int getCapacity() {
156
156
157
157
}.register (this );
158
158
159
- new ResinExtractor (category , resinExtractor2 , RecipeType .ENHANCED_CRAFTING_TABLE ,
159
+ new ResinExtractor (itemGroup , resinExtractor2 , RecipeType .ENHANCED_CRAFTING_TABLE ,
160
160
new ItemStack [] {
161
161
SlimefunItems .REINFORCED_ALLOY_INGOT , diamondTreeTap , SlimefunItems .REINFORCED_ALLOY_INGOT ,
162
162
SlimefunItems .GOLD_24K , SlimefunItems .CARBONADO , SlimefunItems .GOLD_24K ,
@@ -189,42 +189,42 @@ public int getCapacity() {
189
189
190
190
}.register (this );
191
191
192
- new SlimefunItem (category , rawPlastic , rubberFactoryType ,
192
+ new SlimefunItem (itemGroup , rawPlastic , rubberFactoryType ,
193
193
new ItemStack [] {
194
194
null , null , null ,
195
195
null , new SlimefunItemStack (rubber , 2 ), null ,
196
196
null , null , null
197
197
}).register (this );
198
198
199
- new SlimefunItem (category , rubber , rubberFactoryType ,
199
+ new SlimefunItem (itemGroup , rubber , rubberFactoryType ,
200
200
new ItemStack [] {
201
201
null , null , null ,
202
202
null , stickyResin , null ,
203
203
null , null , null
204
204
}).register (this );
205
205
206
- new SlimefunItem (category , amber , RecipeType .SMELTERY ,
206
+ new SlimefunItem (itemGroup , amber , RecipeType .SMELTERY ,
207
207
new ItemStack [] {
208
208
new SlimefunItemStack (stickyResin , 4 ), null , null ,
209
209
null , null , null ,
210
210
null , null , null
211
211
}).register (this );
212
212
213
- new SlimefunItem (category , amberBlock , RecipeType .ENHANCED_CRAFTING_TABLE ,
213
+ new SlimefunItem (itemGroup , amberBlock , RecipeType .ENHANCED_CRAFTING_TABLE ,
214
214
new ItemStack [] {
215
215
amber , amber , amber ,
216
216
amber , amber , amber ,
217
217
amber , amber , amber
218
218
}).register (this );
219
219
220
- new UnplaceableBlock (category , blueEnderPearl , RecipeType .ENHANCED_CRAFTING_TABLE ,
220
+ new UnplaceableBlock (itemGroup , blueEnderPearl , RecipeType .ENHANCED_CRAFTING_TABLE ,
221
221
new ItemStack [] {
222
222
new ItemStack (Material .LAPIS_BLOCK ), amberBlock , new ItemStack (Material .LAPIS_BLOCK ),
223
223
amberBlock , new ItemStack (Material .ENDER_PEARL ), amberBlock ,
224
224
new ItemStack (Material .LAPIS_BLOCK ), amberBlock , new ItemStack (Material .LAPIS_BLOCK )
225
225
}).register (this );
226
226
227
- MagicalMirror mirror = new MagicalMirror (this , category , magicalMirror , RecipeType .ENHANCED_CRAFTING_TABLE ,
227
+ MagicalMirror mirror = new MagicalMirror (this , itemGroup , magicalMirror , RecipeType .ENHANCED_CRAFTING_TABLE ,
228
228
new ItemStack [] {
229
229
new ItemStack (Material .GLASS ), amber , new ItemStack (Material .GLASS ),
230
230
amber , blueEnderPearl , amber ,
0 commit comments