77import org .bukkit .plugin .java .JavaPlugin ;
88
99import io .github .thebusybiscuit .slimefun4 .api .SlimefunAddon ;
10- import io .github .thebusybiscuit .slimefun4 .core .researching .Research ;
10+ import io .github .thebusybiscuit .slimefun4 .api .items .ItemGroup ;
11+ import io .github .thebusybiscuit .slimefun4 .api .items .SlimefunItemStack ;
12+ import io .github .thebusybiscuit .slimefun4 .api .researches .Research ;
1113import io .github .thebusybiscuit .slimefun4 .implementation .SlimefunItems ;
12- import me .mrCookieSlime .Slimefun .Objects .Category ;
13- import me .mrCookieSlime .Slimefun .api .SlimefunItemStack ;
14- import me .mrCookieSlime .Slimefun .cscorelib2 .config .Config ;
15- import me .mrCookieSlime .Slimefun .cscorelib2 .item .CustomItem ;
16- import me .mrCookieSlime .Slimefun .cscorelib2 .skull .SkullItem ;
17- import me .mrCookieSlime .Slimefun .cscorelib2 .updater .GitHubBuildsUpdater ;
14+ import io .github .thebusybiscuit .slimefun4 .libraries .dough .config .Config ;
15+ import io .github .thebusybiscuit .slimefun4 .libraries .dough .items .CustomItemStack ;
16+ import io .github .thebusybiscuit .slimefun4 .libraries .dough .skins .PlayerHead ;
17+ import io .github .thebusybiscuit .slimefun4 .libraries .dough .skins .PlayerSkin ;
18+ import io .github .thebusybiscuit .slimefun4 .libraries .dough .updater .GitHubBuildsUpdater ;
1819
1920/**
2021 * This is the main class of the {@link DyedBackpacks} addon.
@@ -37,35 +38,35 @@ public void onEnable() {
3738 }
3839
3940 Research research = new Research (new NamespacedKey (this , "dyed_backpacks" ), 17200 , "Dyed Backpacks" , 24 );
40- Category category = new Category (new NamespacedKey (this , "dyed_backpacks" ), new CustomItem ( SkullItem . fromHash ( BackpackColor .RED .getTexture ()), "&4Dyed Backpacks" ), 2 );
41+ ItemGroup itemGroup = new ItemGroup (new NamespacedKey (this , "dyed_backpacks" ), new CustomItemStack ( PlayerHead . getItemStack ( PlayerSkin . fromHashCode ( BackpackColor .RED .getTexture () )), "&4Dyed Backpacks" ), 2 );
4142
4243 if (cfg .getBoolean ("backpacks.small" )) {
43- createBackpacks (category , research , SlimefunItems .BACKPACK_SMALL , 9 );
44+ createBackpacks (itemGroup , research , SlimefunItems .BACKPACK_SMALL , 9 );
4445 }
4546 if (cfg .getBoolean ("backpacks.normal" )) {
46- createBackpacks (category , research , SlimefunItems .BACKPACK_MEDIUM , 18 );
47+ createBackpacks (itemGroup , research , SlimefunItems .BACKPACK_MEDIUM , 18 );
4748 }
4849 if (cfg .getBoolean ("backpacks.large" )) {
49- createBackpacks (category , research , SlimefunItems .BACKPACK_LARGE , 27 );
50+ createBackpacks (itemGroup , research , SlimefunItems .BACKPACK_LARGE , 27 );
5051 }
5152 if (cfg .getBoolean ("backpacks.woven" )) {
52- createBackpacks (category , research , SlimefunItems .WOVEN_BACKPACK , 36 );
53+ createBackpacks (itemGroup , research , SlimefunItems .WOVEN_BACKPACK , 36 );
5354 }
5455 if (cfg .getBoolean ("backpacks.gilded" )) {
55- createBackpacks (category , research , SlimefunItems .GILDED_BACKPACK , 45 );
56+ createBackpacks (itemGroup , research , SlimefunItems .GILDED_BACKPACK , 45 );
5657 }
5758 if (cfg .getBoolean ("backpacks.radiant" )) {
58- createBackpacks (category , research , SlimefunItems .RADIANT_BACKPACK , 54 );
59+ createBackpacks (itemGroup , research , SlimefunItems .RADIANT_BACKPACK , 54 );
5960 }
6061
6162 research .register ();
6263 }
6364
6465 @ ParametersAreNonnullByDefault
65- private void createBackpacks (Category category , Research research , SlimefunItemStack backpack , int size ) {
66+ private void createBackpacks (ItemGroup itemGroup , Research research , SlimefunItemStack backpack , int size ) {
6667 for (BackpackColor color : BackpackColor .values ()) {
6768 SlimefunItemStack item = new SlimefunItemStack ("DYED_" + backpack .getItemId () + "_" + color .name (), color .getTexture (), backpack .getItemMeta ().getDisplayName () + " &7(" + color .getName () + "&7)" , backpack .getItemMeta ().getLore ().toArray (new String [0 ]));
68- DyedBackpack dyed = new DyedBackpack (size , category , item , backpack , color );
69+ DyedBackpack dyed = new DyedBackpack (size , itemGroup , item , backpack , color );
6970 research .addItems (dyed );
7071 dyed .register (this );
7172 }
0 commit comments