From 8e7ef44bc556cb1cd9225138ea487a9f02fc01e0 Mon Sep 17 00:00:00 2001 From: Varian Anora Date: Fri, 3 Sep 2021 23:32:05 +0700 Subject: [PATCH 1/3] Update to RC-27 --- .idea/.gitignore | 8 ++ .idea/compiler.xml | 13 +++ .idea/discord.xml | 7 ++ .idea/encodings.xml | 8 ++ .idea/jarRepositories.xml | 40 +++++++ .idea/misc.xml | 17 +++ .idea/runConfigurations.xml | 10 ++ .idea/vcs.xml | 6 ++ SlimefunLuckyBlocks.iml | 12 +++ dependency-reduced-pom.xml | 100 ++++++++++++++++++ pom.xml | 6 +- .../slimefunluckyblocks/LuckyBlock.java | 12 +-- .../SlimefunLuckyBlocks.java | 47 ++++---- .../surprises/lucky/LuckyAxeSurprise.java | 4 +- .../surprises/lucky/LuckyBootsSurprise.java | 4 +- .../lucky/LuckyChestplateSurprise.java | 4 +- .../surprises/lucky/LuckyHelmetSurprise.java | 4 +- .../lucky/LuckyLeggingsSurprise.java | 4 +- .../surprises/lucky/LuckyPickaxeSurprise.java | 4 +- .../surprises/lucky/LuckySwordSurprise.java | 4 +- .../surprises/neutral/PotatOSSurprise.java | 4 +- .../surprises/pandora/ReapersSurprise.java | 9 +- .../unlucky/BryanZombieSurprise.java | 4 +- .../surprises/unlucky/WalshrusSurprise.java | 9 +- .../unlucky/ZombiePigmenSurprise.java | 4 +- 25 files changed, 281 insertions(+), 63 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/compiler.xml create mode 100644 .idea/discord.xml create mode 100644 .idea/encodings.xml create mode 100644 .idea/jarRepositories.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/runConfigurations.xml create mode 100644 .idea/vcs.xml create mode 100644 SlimefunLuckyBlocks.iml create mode 100644 dependency-reduced-pom.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..73f69e0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..b300c28 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/discord.xml b/.idea/discord.xml new file mode 100644 index 0000000..30bab2a --- /dev/null +++ b/.idea/discord.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..af673e7 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..6c993d9 --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..2429292 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..797acea --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/SlimefunLuckyBlocks.iml b/SlimefunLuckyBlocks.iml new file mode 100644 index 0000000..fa63d4b --- /dev/null +++ b/SlimefunLuckyBlocks.iml @@ -0,0 +1,12 @@ + + + + + + + SPIGOT + + + + + \ No newline at end of file diff --git a/dependency-reduced-pom.xml b/dependency-reduced-pom.xml new file mode 100644 index 0000000..1ec0928 --- /dev/null +++ b/dependency-reduced-pom.xml @@ -0,0 +1,100 @@ + + + 4.0.0 + io.github.thebusybiscuit + SlimefunLuckyBlocks + UNOFFICIAL + + ${basedir}/src/main/java + clean package + + + true + ${basedir}/src/main/resources + + * + + + + ${basedir} + + LICENSE + + + + ${project.name} v${project.version} + + + maven-shade-plugin + 3.2.4 + + + package + + shade + + + + + + + org.bstats + io.github.thebusybiscuit.slimefunluckyblocks.bstats + + + + + *:* + + META-INF/* + + + + + + + + + + paper-repo + https://repo.destroystokyo.com/repository/maven-public/ + + + spigot-repo + https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + + jitpack.io + https://jitpack.io + + + codemc-repo + https://repo.codemc.org/repository/maven-public + + + + + org.spigotmc + spigot-api + 1.16.5-R0.1-SNAPSHOT + provided + + + com.github.TheBusyBiscuit + Slimefun4 + RC-27 + provided + + + dough-api + io.github.baked-libs + + + + + + 1.8 + 1.8 + UTF-8 + + diff --git a/pom.xml b/pom.xml index edec430..3cdae01 100644 --- a/pom.xml +++ b/pom.xml @@ -105,12 +105,12 @@ com.github.TheBusyBiscuit Slimefun4 - RC-21 + RC-27 provided - io.github.thebusybiscuit - cscorelib2 + io.github.baked-libs + dough-api diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/LuckyBlock.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/LuckyBlock.java index 91e7c7e..cf84961 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/LuckyBlock.java +++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/LuckyBlock.java @@ -14,20 +14,20 @@ import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.inventory.ItemStack; +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.core.handlers.BlockBreakHandler; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.Surprise; -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; public class LuckyBlock extends SlimefunItem { private Collection surprises; private Predicate predicate; - public LuckyBlock(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { - super(category, item, recipeType, recipe); + public LuckyBlock(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { + super(itemGroup, item, recipeType, recipe); addItemHandler(onBlockBreak()); } diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/SlimefunLuckyBlocks.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/SlimefunLuckyBlocks.java index c2ee14e..ddebee4 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/SlimefunLuckyBlocks.java +++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/SlimefunLuckyBlocks.java @@ -22,9 +22,19 @@ import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.potion.PotionEffect; +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.SlimefunAddon; +import io.github.thebusybiscuit.slimefun4.libraries.dough.common.ChatColors; +import io.github.thebusybiscuit.slimefun4.libraries.dough.common.CommonPatterns; +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.skins.PlayerHead; +import io.github.thebusybiscuit.slimefun4.libraries.dough.skins.PlayerSkin; +import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.GitHubBuildsUpdater; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems; -import io.github.thebusybiscuit.slimefun4.utils.PatternUtils; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.CustomItemSurprise; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.LuckLevel; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.Surprise; @@ -79,18 +89,7 @@ import io.github.thebusybiscuit.slimefunluckyblocks.surprises.unlucky.WalshrusSurprise; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.unlucky.WitchSurprise; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.unlucky.ZombiePigmenSurprise; -import me.mrCookieSlime.Slimefun.Lists.RecipeType; -import me.mrCookieSlime.Slimefun.Objects.Category; -import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import me.mrCookieSlime.Slimefun.api.BlockStorage; -import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; -import me.mrCookieSlime.Slimefun.cscorelib2.chat.ChatColors; -import me.mrCookieSlime.Slimefun.cscorelib2.config.Config; -import me.mrCookieSlime.Slimefun.cscorelib2.item.CustomItem; -import me.mrCookieSlime.Slimefun.cscorelib2.skull.SkullBlock; -import me.mrCookieSlime.Slimefun.cscorelib2.skull.SkullItem; -import me.mrCookieSlime.Slimefun.cscorelib2.updater.GitHubBuildsUpdater; -import me.mrCookieSlime.Slimefun.cscorelib2.updater.Updater; public class SlimefunLuckyBlocks extends JavaPlugin implements SlimefunAddon { @@ -107,15 +106,11 @@ public void onEnable() { // Setting up bStats new Metrics(this, 4858); - if (getDescription().getVersion().startsWith("DEV - ")) { - Updater updater = new GitHubBuildsUpdater(this, getFile(), "TheBusyBiscuit/luckyblocks-sf/master"); - - if (cfg.getBoolean("options.auto-update")) { - updater.start(); - } + if (cfg.getBoolean("options.auto-update") && getDescription().getVersion().startsWith("DEV - ")) { + new GitHubBuildsUpdater(this, getFile(), "TheBusyBiscuit/luckyblocks-sf/master").start(); } - Category category = new Category(new NamespacedKey(this, "lucky_blocks"), new CustomItem(SkullItem.fromHash(TEXTURE), "&rLucky Blocks")); + ItemGroup itemGroup = new ItemGroup(new NamespacedKey(this, "lucky_blocks"), new CustomItemStack(PlayerHead.getItemStack(PlayerSkin.fromHashCode(TEXTURE)), "&rLucky Blocks")); SlimefunItemStack luckyBlock = new SlimefunItemStack("LUCKY_BLOCK", TEXTURE, "&fLucky Block", "&7Luck: &f0"); SlimefunItemStack veryLuckyBlock = new SlimefunItemStack("LUCKY_BLOCK_LUCKY", TEXTURE, "&fVery lucky Block", "&7Luck: &a+80"); @@ -123,16 +118,16 @@ public void onEnable() { SlimefunItemStack pandorasBox = new SlimefunItemStack("PANDORAS_BOX", "86c7dde512871bd607b77e6635ad39f44f2d5b4729e60273f1b14fba9a86a", "&5Pandora\"s Box", "&7Luck: &c&oERROR"); // @formatter:off - new LuckyBlock(category, luckyBlock, RecipeType.ENHANCED_CRAFTING_TABLE, + new LuckyBlock(itemGroup, luckyBlock, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] { SlimefunItems.GOLD_12K, SlimefunItems.GOLD_12K, SlimefunItems.GOLD_12K, SlimefunItems.GOLD_12K, new ItemStack(Material.DISPENSER), SlimefunItems.GOLD_12K, SlimefunItems.GOLD_12K, SlimefunItems.GOLD_12K, SlimefunItems.GOLD_12K }).register(this, surprises, s -> s.getLuckLevel() != LuckLevel.PANDORA); - new LuckyBlock(category, veryLuckyBlock, RecipeType.ENHANCED_CRAFTING_TABLE, + new LuckyBlock(itemGroup, veryLuckyBlock, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] { null, SlimefunItems.GOLD_12K, null, SlimefunItems.GOLD_12K, luckyBlock, SlimefunItems.GOLD_12K, null, SlimefunItems.GOLD_12K, null }).register(this, surprises, s -> s.getLuckLevel() == LuckLevel.LUCKY); - new LuckyBlock(category, veryUnluckyBlock, RecipeType.ENHANCED_CRAFTING_TABLE, + new LuckyBlock(itemGroup, veryUnluckyBlock, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] { null, new ItemStack(Material.SPIDER_EYE), null, new ItemStack(Material.SPIDER_EYE), luckyBlock, new ItemStack(Material.SPIDER_EYE), null, new ItemStack(Material.SPIDER_EYE), null }).register(this, surprises, s -> s.getLuckLevel() == LuckLevel.UNLUCKY); - new LuckyBlock(category, pandorasBox, RecipeType.ENHANCED_CRAFTING_TABLE, + new LuckyBlock(itemGroup, pandorasBox, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] { new ItemStack(Material.OAK_PLANKS), new ItemStack(Material.LAPIS_BLOCK), new ItemStack(Material.OAK_PLANKS), new ItemStack(Material.LAPIS_BLOCK), luckyBlock, new ItemStack(Material.LAPIS_BLOCK), new ItemStack(Material.OAK_PLANKS), new ItemStack(Material.LAPIS_BLOCK), new ItemStack(Material.OAK_PLANKS) }).register(this, surprises, s -> s.getLuckLevel() == LuckLevel.PANDORA); // @formatter:on @@ -233,7 +228,7 @@ private void registerCustomSurprises() { if (cfg.getString(itemPath + ".slimefun_item") != null) { String id = cfg.getString(itemPath + ".slimefun_item").toUpperCase(Locale.ROOT); - SlimefunItem sfItem = SlimefunItem.getByID(id); + SlimefunItem sfItem = SlimefunItem.getById(id); if (sfItem != null) { item = sfItem.getItem(); @@ -273,7 +268,7 @@ private void registerCustomSurprises() { if (enchantment != null) { if (split.length == 2) { - if (!PatternUtils.NUMERIC.matcher(split[1]).matches()) { + if (!CommonPatterns.NUMERIC.matcher(split[1]).matches()) { getLogger().log(Level.WARNING, "Could not set \"{0}\" enchant with level \"{1}\" for custom surprise \"{2}\"", new Object[] { enchName, split[1], name }); continue; } @@ -344,7 +339,7 @@ public void spawnLuckyBlock(Block b) { }); b.setBlockData(data); - SkullBlock.setFromHash(b, TEXTURE); + PlayerHead.setSkin(b, PlayerSkin.fromHashCode(TEXTURE), true); BlockStorage.store(b, "LUCKY_BLOCK"); if (getCfg().getBoolean("debug")) { diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyAxeSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyAxeSurprise.java index c562126..5b3485b 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyAxeSurprise.java +++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyAxeSurprise.java @@ -10,14 +10,14 @@ import io.github.thebusybiscuit.slimefunluckyblocks.surprises.LuckLevel; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.Surprise; -import me.mrCookieSlime.Slimefun.cscorelib2.item.CustomItem; +import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; public final class LuckyAxeSurprise implements Surprise { private final ItemStack axe; public LuckyAxeSurprise() { - axe = new CustomItem(Material.GOLDEN_AXE, "&e&lLucky Axe"); + axe = new CustomItemStack(Material.GOLDEN_AXE, "&e&lLucky Axe"); axe.addUnsafeEnchantment(Enchantment.DAMAGE_ALL, 10); axe.addUnsafeEnchantment(Enchantment.DIG_SPEED, 10); axe.addUnsafeEnchantment(Enchantment.LOOT_BONUS_BLOCKS, 10); diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyBootsSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyBootsSurprise.java index 50cde77..3b0dfb7 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyBootsSurprise.java +++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyBootsSurprise.java @@ -10,14 +10,14 @@ import io.github.thebusybiscuit.slimefunluckyblocks.surprises.LuckLevel; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.Surprise; -import me.mrCookieSlime.Slimefun.cscorelib2.item.CustomItem; +import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; public final class LuckyBootsSurprise implements Surprise { private final ItemStack boots; public LuckyBootsSurprise() { - boots = new CustomItem(Material.DIAMOND_BOOTS, "&e&lLucky Boots"); + boots = new CustomItemStack(Material.DIAMOND_BOOTS, "&e&lLucky Boots"); boots.addUnsafeEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 10); boots.addUnsafeEnchantment(Enchantment.PROTECTION_PROJECTILE, 10); boots.addUnsafeEnchantment(Enchantment.PROTECTION_EXPLOSIONS, 5); diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyChestplateSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyChestplateSurprise.java index 74cd95a..6a22c13 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyChestplateSurprise.java +++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyChestplateSurprise.java @@ -10,14 +10,14 @@ import io.github.thebusybiscuit.slimefunluckyblocks.surprises.LuckLevel; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.Surprise; -import me.mrCookieSlime.Slimefun.cscorelib2.item.CustomItem; +import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; public final class LuckyChestplateSurprise implements Surprise { private final ItemStack chestplate; public LuckyChestplateSurprise() { - chestplate = new CustomItem(Material.DIAMOND_CHESTPLATE, "&e&lLucky Chestplate"); + chestplate = new CustomItemStack(Material.DIAMOND_CHESTPLATE, "&e&lLucky Chestplate"); chestplate.addUnsafeEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 10); chestplate.addUnsafeEnchantment(Enchantment.PROTECTION_PROJECTILE, 10); chestplate.addUnsafeEnchantment(Enchantment.PROTECTION_EXPLOSIONS, 5); diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyHelmetSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyHelmetSurprise.java index c47c3e5..7da0634 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyHelmetSurprise.java +++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyHelmetSurprise.java @@ -10,14 +10,14 @@ import io.github.thebusybiscuit.slimefunluckyblocks.surprises.LuckLevel; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.Surprise; -import me.mrCookieSlime.Slimefun.cscorelib2.item.CustomItem; +import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; public final class LuckyHelmetSurprise implements Surprise { private final ItemStack helmet; public LuckyHelmetSurprise() { - helmet = new CustomItem(Material.DIAMOND_HELMET, "&e&lLucky Helmet"); + helmet = new CustomItemStack(Material.DIAMOND_HELMET, "&e&lLucky Helmet"); helmet.addUnsafeEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 10); helmet.addUnsafeEnchantment(Enchantment.PROTECTION_PROJECTILE, 10); helmet.addUnsafeEnchantment(Enchantment.PROTECTION_EXPLOSIONS, 5); diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyLeggingsSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyLeggingsSurprise.java index 06abe16..733b1c1 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyLeggingsSurprise.java +++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyLeggingsSurprise.java @@ -10,14 +10,14 @@ import io.github.thebusybiscuit.slimefunluckyblocks.surprises.LuckLevel; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.Surprise; -import me.mrCookieSlime.Slimefun.cscorelib2.item.CustomItem; +import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; public final class LuckyLeggingsSurprise implements Surprise { private final ItemStack leggings; public LuckyLeggingsSurprise() { - leggings = new CustomItem(Material.DIAMOND_LEGGINGS, "&e&lLucky Leggings"); + leggings = new CustomItemStack(Material.DIAMOND_LEGGINGS, "&e&lLucky Leggings"); leggings.addUnsafeEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 10); leggings.addUnsafeEnchantment(Enchantment.PROTECTION_PROJECTILE, 10); leggings.addUnsafeEnchantment(Enchantment.PROTECTION_EXPLOSIONS, 5); diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyPickaxeSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyPickaxeSurprise.java index acd213d..81d3390 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyPickaxeSurprise.java +++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyPickaxeSurprise.java @@ -10,14 +10,14 @@ import io.github.thebusybiscuit.slimefunluckyblocks.surprises.LuckLevel; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.Surprise; -import me.mrCookieSlime.Slimefun.cscorelib2.item.CustomItem; +import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; public final class LuckyPickaxeSurprise implements Surprise { private final ItemStack pickaxe; public LuckyPickaxeSurprise() { - pickaxe = new CustomItem(Material.GOLDEN_PICKAXE, "&e&lLucky Pickaxe"); + pickaxe = new CustomItemStack(Material.GOLDEN_PICKAXE, "&e&lLucky Pickaxe"); pickaxe.addUnsafeEnchantment(Enchantment.DIG_SPEED, 10); pickaxe.addUnsafeEnchantment(Enchantment.LOOT_BONUS_BLOCKS, 10); pickaxe.addUnsafeEnchantment(Enchantment.DURABILITY, 10); diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckySwordSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckySwordSurprise.java index 86ebb0d..51c7680 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckySwordSurprise.java +++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckySwordSurprise.java @@ -10,14 +10,14 @@ import io.github.thebusybiscuit.slimefunluckyblocks.surprises.LuckLevel; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.Surprise; -import me.mrCookieSlime.Slimefun.cscorelib2.item.CustomItem; +import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; public final class LuckySwordSurprise implements Surprise { private final ItemStack sword; public LuckySwordSurprise() { - sword = new CustomItem(Material.GOLDEN_SWORD, "&e&lLucky Sword"); + sword = new CustomItemStack(Material.GOLDEN_SWORD, "&e&lLucky Sword"); sword.addUnsafeEnchantment(Enchantment.DAMAGE_ALL, 10); sword.addUnsafeEnchantment(Enchantment.LOOT_BONUS_MOBS, 10); sword.addUnsafeEnchantment(Enchantment.DURABILITY, 10); diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/neutral/PotatOSSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/neutral/PotatOSSurprise.java index cbd316f..eaeea88 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/neutral/PotatOSSurprise.java +++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/neutral/PotatOSSurprise.java @@ -8,7 +8,7 @@ import io.github.thebusybiscuit.slimefunluckyblocks.surprises.LuckLevel; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.Surprise; -import me.mrCookieSlime.Slimefun.cscorelib2.item.CustomItem; +import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; public final class PotatOSSurprise implements Surprise { @@ -19,7 +19,7 @@ public String getName() { @Override public void activate(Random random, Player p, Location l) { - l.getWorld().dropItemNaturally(l, new CustomItem(Material.POTATO, "&e&lPotatOS")); + l.getWorld().dropItemNaturally(l, new CustomItemStack(Material.POTATO, "&e&lPotatOS")); } @Override diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/pandora/ReapersSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/pandora/ReapersSurprise.java index 68360f8..bb94bf7 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/pandora/ReapersSurprise.java +++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/pandora/ReapersSurprise.java @@ -15,15 +15,16 @@ import io.github.thebusybiscuit.slimefunluckyblocks.surprises.LuckLevel; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.Surprise; -import me.mrCookieSlime.Slimefun.cscorelib2.item.CustomItem; -import me.mrCookieSlime.Slimefun.cscorelib2.skull.SkullItem; +import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; +import io.github.thebusybiscuit.slimefun4.libraries.dough.skins.PlayerHead; +import io.github.thebusybiscuit.slimefun4.libraries.dough.skins.PlayerSkin; public final class ReapersSurprise implements Surprise { private final ItemStack hoe; public ReapersSurprise() { - hoe = new CustomItem(Material.GOLDEN_HOE, "&e&lLucky Hoe"); + hoe = new CustomItemStack(Material.GOLDEN_HOE, "&e&lLucky Hoe"); hoe.addUnsafeEnchantment(Enchantment.DAMAGE_ALL, 10); hoe.addUnsafeEnchantment(Enchantment.LOOT_BONUS_MOBS, 10); hoe.addUnsafeEnchantment(Enchantment.FIRE_ASPECT, 5); @@ -42,7 +43,7 @@ public void activate(Random random, Player p, Location l) { zombie.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(120D); zombie.setHealth(120D); - zombie.getEquipment().setHelmet(SkullItem.fromBase64("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTkzN2FmMjYzMzI2ZTJiNDA5MDQyNzFiODMxYzNiMTc2ZWEyMWYwMTg2YmZhZjRlMTZlZWUxZTI4OWRkYWQ4In19fQ==")); + zombie.getEquipment().setHelmet(PlayerHead.getItemStack(PlayerSkin.fromBase64("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTkzN2FmMjYzMzI2ZTJiNDA5MDQyNzFiODMxYzNiMTc2ZWEyMWYwMTg2YmZhZjRlMTZlZWUxZTI4OWRkYWQ4In19fQ=="))); zombie.getEquipment().setHelmetDropChance(0F); zombie.getEquipment().setItemInMainHand(hoe.clone()); diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/BryanZombieSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/BryanZombieSurprise.java index 09e2e42..8275eef 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/BryanZombieSurprise.java +++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/BryanZombieSurprise.java @@ -14,14 +14,14 @@ import io.github.thebusybiscuit.slimefunluckyblocks.surprises.LuckLevel; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.Surprise; -import me.mrCookieSlime.Slimefun.cscorelib2.item.CustomItem; +import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; public final class BryanZombieSurprise implements Surprise { private final ItemStack axe; public BryanZombieSurprise() { - axe = new CustomItem(Material.GOLDEN_AXE, "&e&lLucky Axe"); + axe = new CustomItemStack(Material.GOLDEN_AXE, "&e&lLucky Axe"); axe.addUnsafeEnchantment(Enchantment.DAMAGE_ALL, 10); axe.addUnsafeEnchantment(Enchantment.DIG_SPEED, 10); axe.addUnsafeEnchantment(Enchantment.LOOT_BONUS_BLOCKS, 10); diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/WalshrusSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/WalshrusSurprise.java index 331c557..0127457 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/WalshrusSurprise.java +++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/WalshrusSurprise.java @@ -14,15 +14,16 @@ import io.github.thebusybiscuit.slimefunluckyblocks.surprises.LuckLevel; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.Surprise; -import me.mrCookieSlime.Slimefun.cscorelib2.item.CustomItem; -import me.mrCookieSlime.Slimefun.cscorelib2.skull.SkullItem; +import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; +import io.github.thebusybiscuit.slimefun4.libraries.dough.skins.PlayerHead; +import io.github.thebusybiscuit.slimefun4.libraries.dough.skins.PlayerSkin; public final class WalshrusSurprise implements Surprise { private final ItemStack sword; public WalshrusSurprise() { - sword = new CustomItem(Material.GOLDEN_SWORD, "&e&lLucky Sword"); + sword = new CustomItemStack(Material.GOLDEN_SWORD, "&e&lLucky Sword"); sword.addUnsafeEnchantment(Enchantment.DAMAGE_ALL, 10); sword.addUnsafeEnchantment(Enchantment.LOOT_BONUS_MOBS, 10); sword.addUnsafeEnchantment(Enchantment.DURABILITY, 10); @@ -40,7 +41,7 @@ public void activate(Random random, Player p, Location l) { zombie.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(40D); zombie.setHealth(40D); - zombie.getEquipment().setHelmet(SkullItem.fromBase64("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzk2NmYwZWJkNzdmMWJjZDY1NmZhMmRjM2VmMDMwM2UyNmE2YTNkZTQ5OGMzOTk5ZDM5ZmRjYWNjNWY1YWQifX19")); + zombie.getEquipment().setHelmet(PlayerHead.getItemStack(PlayerSkin.fromBase64("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzk2NmYwZWJkNzdmMWJjZDY1NmZhMmRjM2VmMDMwM2UyNmE2YTNkZTQ5OGMzOTk5ZDM5ZmRjYWNjNWY1YWQifX19"))); zombie.getEquipment().setHelmetDropChance(0F); zombie.getEquipment().setItemInMainHand(sword.clone()); diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/ZombiePigmenSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/ZombiePigmenSurprise.java index ab27d02..daa5ea3 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/ZombiePigmenSurprise.java +++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/ZombiePigmenSurprise.java @@ -8,7 +8,7 @@ import org.bukkit.entity.Player; import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion; -import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; +import io.github.thebusybiscuit.slimefun4.implementation.Slimefun; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.LuckLevel; import io.github.thebusybiscuit.slimefunluckyblocks.surprises.Surprise; @@ -22,7 +22,7 @@ public String getName() { @Override public void activate(Random random, Player p, Location l) { for (int i = 0; i < 4; i++) { - EntityType type = SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16) ? EntityType.ZOMBIFIED_PIGLIN : EntityType.valueOf("PIG_ZOMBIE"); + EntityType type = Slimefun.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16) ? EntityType.ZOMBIFIED_PIGLIN : EntityType.valueOf("PIG_ZOMBIE"); PigZombie pigman = (PigZombie) l.getWorld().spawnEntity(l.add(random.nextInt(4) - (double) random.nextInt(8), 1, random.nextInt(4) - (double) random.nextInt(8)), type); pigman.setAngry(true); pigman.setTarget(p); From 92c2c00b223f0442c286f875069e444533c0f576 Mon Sep 17 00:00:00 2001 From: Varian Anora Date: Sat, 4 Sep 2021 09:37:57 +0700 Subject: [PATCH 2/3] Update gitignore and removed .idea stuff --- .gitignore | 5 ++++- .idea/.gitignore | 8 -------- .idea/compiler.xml | 13 ------------ .idea/discord.xml | 7 ------- .idea/encodings.xml | 8 -------- .idea/jarRepositories.xml | 40 ------------------------------------- .idea/misc.xml | 17 ---------------- .idea/runConfigurations.xml | 10 ---------- .idea/vcs.xml | 6 ------ SlimefunLuckyBlocks.iml | 12 ----------- 10 files changed, 4 insertions(+), 122 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/compiler.xml delete mode 100644 .idea/discord.xml delete mode 100644 .idea/encodings.xml delete mode 100644 .idea/jarRepositories.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/runConfigurations.xml delete mode 100644 .idea/vcs.xml delete mode 100644 SlimefunLuckyBlocks.iml diff --git a/.gitignore b/.gitignore index 1bd7db2..8a5a56c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ /target/ .classpath .project -/.settings/* \ No newline at end of file +.iml +/.idea/ +/.settings/* +dependency-reduced-pom.xml diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 73f69e0..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml -# Editor-based HTTP Client requests -/httpRequests/ diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index b300c28..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/discord.xml b/.idea/discord.xml deleted file mode 100644 index 30bab2a..0000000 --- a/.idea/discord.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index af673e7..0000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml deleted file mode 100644 index 6c993d9..0000000 --- a/.idea/jarRepositories.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 2429292..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 797acea..0000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/SlimefunLuckyBlocks.iml b/SlimefunLuckyBlocks.iml deleted file mode 100644 index fa63d4b..0000000 --- a/SlimefunLuckyBlocks.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - SPIGOT - - - - - \ No newline at end of file From 24024f5dba276f22d084460753ca1380504c5e95 Mon Sep 17 00:00:00 2001 From: Varian Anora Date: Sat, 4 Sep 2021 09:38:18 +0700 Subject: [PATCH 3/3] Delete dependency-reduced-pom.xml --- dependency-reduced-pom.xml | 100 ------------------------------------- 1 file changed, 100 deletions(-) delete mode 100644 dependency-reduced-pom.xml diff --git a/dependency-reduced-pom.xml b/dependency-reduced-pom.xml deleted file mode 100644 index 1ec0928..0000000 --- a/dependency-reduced-pom.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - 4.0.0 - io.github.thebusybiscuit - SlimefunLuckyBlocks - UNOFFICIAL - - ${basedir}/src/main/java - clean package - - - true - ${basedir}/src/main/resources - - * - - - - ${basedir} - - LICENSE - - - - ${project.name} v${project.version} - - - maven-shade-plugin - 3.2.4 - - - package - - shade - - - - - - - org.bstats - io.github.thebusybiscuit.slimefunluckyblocks.bstats - - - - - *:* - - META-INF/* - - - - - - - - - - paper-repo - https://repo.destroystokyo.com/repository/maven-public/ - - - spigot-repo - https://hub.spigotmc.org/nexus/content/repositories/snapshots/ - - - jitpack.io - https://jitpack.io - - - codemc-repo - https://repo.codemc.org/repository/maven-public - - - - - org.spigotmc - spigot-api - 1.16.5-R0.1-SNAPSHOT - provided - - - com.github.TheBusyBiscuit - Slimefun4 - RC-27 - provided - - - dough-api - io.github.baked-libs - - - - - - 1.8 - 1.8 - UTF-8 - -