diff --git a/pom.xml b/pom.xml
index 3cdae01..88fcee9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,8 +8,8 @@
UNOFFICIAL
- 1.8
- 1.8
+ 17
+ 17
UTF-8
@@ -59,7 +59,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.2.4
+ 3.3.0
@@ -98,14 +98,14 @@
org.spigotmc
spigot-api
- 1.16.5-R0.1-SNAPSHOT
+ 1.21.4-R0.1-SNAPSHOT
provided
com.github.TheBusyBiscuit
Slimefun4
- RC-27
+ experimental-SNAPSHOT
provided
@@ -118,8 +118,8 @@
org.bstats
bstats-bukkit
- 2.2.1
+ 3.1.0
compile
-
\ No newline at end of file
+
diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/SlimefunLuckyBlocks.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/SlimefunLuckyBlocks.java
index ddebee4..7f6524b 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/SlimefunLuckyBlocks.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/SlimefunLuckyBlocks.java
@@ -110,7 +110,7 @@ public void onEnable() {
new GitHubBuildsUpdater(this, getFile(), "TheBusyBiscuit/luckyblocks-sf/master").start();
}
- ItemGroup itemGroup = new ItemGroup(new NamespacedKey(this, "lucky_blocks"), new CustomItemStack(PlayerHead.getItemStack(PlayerSkin.fromHashCode(TEXTURE)), "&rLucky Blocks"));
+ ItemGroup itemGroup = new ItemGroup(new NamespacedKey(this, "lucky_blocks"), CustomItemStack.create(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");
@@ -119,16 +119,16 @@ public void onEnable() {
// @formatter:off
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 ItemStack[] { SlimefunItems.GOLD_12K.item(), SlimefunItems.GOLD_12K.item(), SlimefunItems.GOLD_12K.item(), SlimefunItems.GOLD_12K.item(), new ItemStack(Material.DISPENSER), SlimefunItems.GOLD_12K.item(), SlimefunItems.GOLD_12K.item(), SlimefunItems.GOLD_12K.item(), SlimefunItems.GOLD_12K.item() }).register(this, surprises, s -> s.getLuckLevel() != LuckLevel.PANDORA);
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 ItemStack[] { null, SlimefunItems.GOLD_12K.item(), null, SlimefunItems.GOLD_12K.item(), luckyBlock.item(), SlimefunItems.GOLD_12K.item(), null, SlimefunItems.GOLD_12K.item(), null }).register(this, surprises, s -> s.getLuckLevel() == LuckLevel.LUCKY);
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 ItemStack[] { null, new ItemStack(Material.SPIDER_EYE), null, new ItemStack(Material.SPIDER_EYE), luckyBlock.item(), new ItemStack(Material.SPIDER_EYE), null, new ItemStack(Material.SPIDER_EYE), null }).register(this, surprises, s -> s.getLuckLevel() == LuckLevel.UNLUCKY);
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);
+ new ItemStack[] { new ItemStack(Material.OAK_PLANKS), new ItemStack(Material.LAPIS_BLOCK), new ItemStack(Material.OAK_PLANKS), new ItemStack(Material.LAPIS_BLOCK), luckyBlock.item(), 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
new WorldGenerator(this);
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 5b3485b..a859eef 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
@@ -17,11 +17,11 @@ public final class LuckyAxeSurprise implements Surprise {
private final ItemStack axe;
public LuckyAxeSurprise() {
- 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);
- axe.addUnsafeEnchantment(Enchantment.DURABILITY, 10);
+ axe = CustomItemStack.create(Material.GOLDEN_AXE, "&e&lLucky Axe");
+ axe.addUnsafeEnchantment(Enchantment.SHARPNESS, 10);
+ axe.addUnsafeEnchantment(Enchantment.EFFICIENCY, 10);
+ axe.addUnsafeEnchantment(Enchantment.FORTUNE, 10);
+ axe.addUnsafeEnchantment(Enchantment.UNBREAKING, 10);
}
@Override
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 3b0dfb7..a1a18d2 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
@@ -17,12 +17,12 @@ public final class LuckyBootsSurprise implements Surprise {
private final ItemStack boots;
public LuckyBootsSurprise() {
- 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);
+ boots = CustomItemStack.create(Material.DIAMOND_BOOTS, "&e&lLucky Boots");
+ boots.addUnsafeEnchantment(Enchantment.PROTECTION, 10);
+ boots.addUnsafeEnchantment(Enchantment.PROJECTILE_PROTECTION, 10);
+ boots.addUnsafeEnchantment(Enchantment.BLAST_PROTECTION, 5);
boots.addUnsafeEnchantment(Enchantment.THORNS, 10);
- boots.addUnsafeEnchantment(Enchantment.DURABILITY, 10);
+ boots.addUnsafeEnchantment(Enchantment.UNBREAKING, 10);
}
@Override
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 6a22c13..b2d5c3e 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
@@ -17,12 +17,12 @@ public final class LuckyChestplateSurprise implements Surprise {
private final ItemStack chestplate;
public LuckyChestplateSurprise() {
- 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);
+ chestplate = CustomItemStack.create(Material.DIAMOND_CHESTPLATE, "&e&lLucky Chestplate");
+ chestplate.addUnsafeEnchantment(Enchantment.PROTECTION, 10);
+ chestplate.addUnsafeEnchantment(Enchantment.PROJECTILE_PROTECTION, 10);
+ chestplate.addUnsafeEnchantment(Enchantment.BLAST_PROTECTION, 5);
chestplate.addUnsafeEnchantment(Enchantment.THORNS, 10);
- chestplate.addUnsafeEnchantment(Enchantment.DURABILITY, 10);
+ chestplate.addUnsafeEnchantment(Enchantment.UNBREAKING, 10);
}
@Override
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 7da0634..089c4b5 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
@@ -17,12 +17,12 @@ public final class LuckyHelmetSurprise implements Surprise {
private final ItemStack helmet;
public LuckyHelmetSurprise() {
- 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);
+ helmet = CustomItemStack.create(Material.DIAMOND_HELMET, "&e&lLucky Helmet");
+ helmet.addUnsafeEnchantment(Enchantment.PROTECTION, 10);
+ helmet.addUnsafeEnchantment(Enchantment.PROJECTILE_PROTECTION, 10);
+ helmet.addUnsafeEnchantment(Enchantment.BLAST_PROTECTION, 5);
helmet.addUnsafeEnchantment(Enchantment.THORNS, 10);
- helmet.addUnsafeEnchantment(Enchantment.DURABILITY, 10);
+ helmet.addUnsafeEnchantment(Enchantment.UNBREAKING, 10);
}
@Override
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 733b1c1..1addc2f 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
@@ -17,12 +17,12 @@ public final class LuckyLeggingsSurprise implements Surprise {
private final ItemStack leggings;
public LuckyLeggingsSurprise() {
- 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);
+ leggings = CustomItemStack.create(Material.DIAMOND_LEGGINGS, "&e&lLucky Leggings");
+ leggings.addUnsafeEnchantment(Enchantment.PROTECTION, 10);
+ leggings.addUnsafeEnchantment(Enchantment.PROJECTILE_PROTECTION, 10);
+ leggings.addUnsafeEnchantment(Enchantment.BLAST_PROTECTION, 5);
leggings.addUnsafeEnchantment(Enchantment.THORNS, 10);
- leggings.addUnsafeEnchantment(Enchantment.DURABILITY, 10);
+ leggings.addUnsafeEnchantment(Enchantment.UNBREAKING, 10);
}
@Override
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 81d3390..5147805 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
@@ -17,10 +17,10 @@ public final class LuckyPickaxeSurprise implements Surprise {
private final ItemStack pickaxe;
public LuckyPickaxeSurprise() {
- 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);
+ pickaxe = CustomItemStack.create(Material.GOLDEN_PICKAXE, "&e&lLucky Pickaxe");
+ pickaxe.addUnsafeEnchantment(Enchantment.EFFICIENCY, 10);
+ pickaxe.addUnsafeEnchantment(Enchantment.FORTUNE, 10);
+ pickaxe.addUnsafeEnchantment(Enchantment.UNBREAKING, 10);
}
@Override
diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyPotionsSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyPotionsSurprise.java
index b52d858..926413c 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyPotionsSurprise.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/LuckyPotionsSurprise.java
@@ -24,9 +24,9 @@ public void activate(Random random, Player p, Location l) {
l.getWorld().dropItemNaturally(l, SlimefunLuckyBlocks.createPotion(Color.FUCHSIA, new PotionEffect(PotionEffectType.REGENERATION, 45, 0), true));
l.getWorld().dropItemNaturally(l, SlimefunLuckyBlocks.createPotion(Color.SILVER, new PotionEffect(PotionEffectType.SPEED, 180, 0), true));
l.getWorld().dropItemNaturally(l, SlimefunLuckyBlocks.createPotion(Color.ORANGE, new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 180, 0), true));
- l.getWorld().dropItemNaturally(l, SlimefunLuckyBlocks.createPotion(Color.RED, new PotionEffect(PotionEffectType.HEAL, 0, 0), true));
+ l.getWorld().dropItemNaturally(l, SlimefunLuckyBlocks.createPotion(Color.RED, new PotionEffect(PotionEffectType.HEALTH_BOOST, 0, 0), true));
l.getWorld().dropItemNaturally(l, SlimefunLuckyBlocks.createPotion(Color.NAVY, new PotionEffect(PotionEffectType.NIGHT_VISION, 180, 0), true));
- l.getWorld().dropItemNaturally(l, SlimefunLuckyBlocks.createPotion(Color.MAROON, new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 180, 0), true));
+ l.getWorld().dropItemNaturally(l, SlimefunLuckyBlocks.createPotion(Color.MAROON, new PotionEffect(PotionEffectType.STRENGTH, 180, 0), true));
}
@Override
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 51c7680..819f037 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
@@ -17,10 +17,10 @@ public final class LuckySwordSurprise implements Surprise {
private final ItemStack sword;
public LuckySwordSurprise() {
- 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);
+ sword = CustomItemStack.create(Material.GOLDEN_SWORD, "&e&lLucky Sword");
+ sword.addUnsafeEnchantment(Enchantment.SHARPNESS, 10);
+ sword.addUnsafeEnchantment(Enchantment.LOOTING, 10);
+ sword.addUnsafeEnchantment(Enchantment.UNBREAKING, 10);
sword.addUnsafeEnchantment(Enchantment.FIRE_ASPECT, 5);
}
diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/UnluckyPotionsSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/UnluckyPotionsSurprise.java
index 4473e61..c63be43 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/UnluckyPotionsSurprise.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/UnluckyPotionsSurprise.java
@@ -23,8 +23,8 @@ public String getName() {
public void activate(Random random, Player p, Location l) {
l.getWorld().dropItemNaturally(l, SlimefunLuckyBlocks.createPotion(Color.GREEN, new PotionEffect(PotionEffectType.POISON, 45, 0), false));
l.getWorld().dropItemNaturally(l, SlimefunLuckyBlocks.createPotion(Color.PURPLE, new PotionEffect(PotionEffectType.WEAKNESS, 90, 0), false));
- l.getWorld().dropItemNaturally(l, SlimefunLuckyBlocks.createPotion(Color.GRAY, new PotionEffect(PotionEffectType.SLOW, 90, 0), false));
- l.getWorld().dropItemNaturally(l, SlimefunLuckyBlocks.createPotion(Color.MAROON, new PotionEffect(PotionEffectType.HARM, 0, 0), false));
+ l.getWorld().dropItemNaturally(l, SlimefunLuckyBlocks.createPotion(Color.GRAY, new PotionEffect(PotionEffectType.SLOWNESS, 90, 0), false));
+ l.getWorld().dropItemNaturally(l, SlimefunLuckyBlocks.createPotion(Color.MAROON, new PotionEffect(PotionEffectType.INSTANT_DAMAGE, 0, 0), false));
}
@Override
diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/XPRainSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/XPRainSurprise.java
index 6b0e50f..11df941 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/XPRainSurprise.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/lucky/XPRainSurprise.java
@@ -19,16 +19,16 @@ public String getName() {
@Override
public void activate(Random random, Player p, Location l) {
- l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.THROWN_EXP_BOTTLE).setVelocity(new Vector(0, 0.5, 0.15));
- l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.THROWN_EXP_BOTTLE).setVelocity(new Vector(0.15, 0.5, 0.15));
- l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.THROWN_EXP_BOTTLE).setVelocity(new Vector(0.15, 0.5, 0));
+ l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.EXPERIENCE_BOTTLE).setVelocity(new Vector(0, 0.5, 0.15));
+ l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.EXPERIENCE_BOTTLE).setVelocity(new Vector(0.15, 0.5, 0.15));
+ l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.EXPERIENCE_BOTTLE).setVelocity(new Vector(0.15, 0.5, 0));
- l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.THROWN_EXP_BOTTLE).setVelocity(new Vector(0, 0.5, -0.15));
- l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.THROWN_EXP_BOTTLE).setVelocity(new Vector(-0.15, 0.5, -0.15));
- l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.THROWN_EXP_BOTTLE).setVelocity(new Vector(-0.15, 0.5, 0));
+ l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.EXPERIENCE_BOTTLE).setVelocity(new Vector(0, 0.5, -0.15));
+ l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.EXPERIENCE_BOTTLE).setVelocity(new Vector(-0.15, 0.5, -0.15));
+ l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.EXPERIENCE_BOTTLE).setVelocity(new Vector(-0.15, 0.5, 0));
- l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.THROWN_EXP_BOTTLE).setVelocity(new Vector(-0.15, 0.5, 0.15));
- l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.THROWN_EXP_BOTTLE).setVelocity(new Vector(0.15, 0.5, -0.15));
+ l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.EXPERIENCE_BOTTLE).setVelocity(new Vector(-0.15, 0.5, 0.15));
+ l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.EXPERIENCE_BOTTLE).setVelocity(new Vector(0.15, 0.5, -0.15));
}
@Override
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 eaeea88..1914aa6 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
@@ -19,7 +19,7 @@ public String getName() {
@Override
public void activate(Random random, Player p, Location l) {
- l.getWorld().dropItemNaturally(l, new CustomItemStack(Material.POTATO, "&e&lPotatOS"));
+ l.getWorld().dropItemNaturally(l, CustomItemStack.create(Material.POTATO, "&e&lPotatOS"));
}
@Override
diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/pandora/IronGolemsSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/pandora/IronGolemsSurprise.java
index cc98fdb..1d109fc 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/pandora/IronGolemsSurprise.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/pandora/IronGolemsSurprise.java
@@ -23,7 +23,7 @@ public String getName() {
public void activate(Random random, Player p, Location l) {
for (int i = 0; i < 12; i++) {
IronGolem golem = (IronGolem) l.getWorld().spawnEntity(l, EntityType.IRON_GOLEM);
- golem.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 999999999, 3));
+ golem.addPotionEffect(new PotionEffect(PotionEffectType.STRENGTH, 999999999, 3));
golem.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 999999999, 1));
golem.setTarget(p);
}
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 bb94bf7..3f02a0b 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
@@ -24,11 +24,11 @@ public final class ReapersSurprise implements Surprise {
private final ItemStack hoe;
public ReapersSurprise() {
- hoe = new CustomItemStack(Material.GOLDEN_HOE, "&e&lLucky Hoe");
- hoe.addUnsafeEnchantment(Enchantment.DAMAGE_ALL, 10);
- hoe.addUnsafeEnchantment(Enchantment.LOOT_BONUS_MOBS, 10);
+ hoe = CustomItemStack.create(Material.GOLDEN_HOE, "&e&lLucky Hoe");
+ hoe.addUnsafeEnchantment(Enchantment.SHARPNESS, 10);
+ hoe.addUnsafeEnchantment(Enchantment.LOOTING, 10);
hoe.addUnsafeEnchantment(Enchantment.FIRE_ASPECT, 5);
- hoe.addUnsafeEnchantment(Enchantment.DURABILITY, 10);
+ hoe.addUnsafeEnchantment(Enchantment.UNBREAKING, 10);
}
@Override
@@ -40,7 +40,7 @@ public String getName() {
public void activate(Random random, Player p, Location l) {
for (int i = 0; i < 4; i++) {
Zombie zombie = (Zombie) l.getWorld().spawnEntity(l, EntityType.ZOMBIE);
- zombie.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(120D);
+ zombie.getAttribute(Attribute.MAX_HEALTH).setBaseValue(120D);
zombie.setHealth(120D);
zombie.getEquipment().setHelmet(PlayerHead.getItemStack(PlayerSkin.fromBase64("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTkzN2FmMjYzMzI2ZTJiNDA5MDQyNzFiODMxYzNiMTc2ZWEyMWYwMTg2YmZhZjRlMTZlZWUxZTI4OWRkYWQ4In19fQ==")));
@@ -51,7 +51,7 @@ public void activate(Random random, Player p, Location l) {
zombie.setCanPickupItems(false);
zombie.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 999999999, 255));
- zombie.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 999999999, 1));
+ zombie.addPotionEffect(new PotionEffect(PotionEffectType.STRENGTH, 999999999, 1));
zombie.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 999999999, 1));
}
}
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 8275eef..05a8b48 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
@@ -21,11 +21,11 @@ public final class BryanZombieSurprise implements Surprise {
private final ItemStack axe;
public BryanZombieSurprise() {
- 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);
- axe.addUnsafeEnchantment(Enchantment.DURABILITY, 10);
+ axe = CustomItemStack.create(Material.GOLDEN_AXE, "&e&lLucky Axe");
+ axe.addUnsafeEnchantment(Enchantment.SHARPNESS, 10);
+ axe.addUnsafeEnchantment(Enchantment.EFFICIENCY, 10);
+ axe.addUnsafeEnchantment(Enchantment.LOOTING, 10);
+ axe.addUnsafeEnchantment(Enchantment.UNBREAKING, 10);
}
@Override
@@ -36,7 +36,7 @@ public String getName() {
@Override
public void activate(Random random, Player p, Location l) {
Zombie zombie = (Zombie) l.getWorld().spawnEntity(l, EntityType.ZOMBIE);
- zombie.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(60D);
+ zombie.getAttribute(Attribute.MAX_HEALTH).setBaseValue(60D);
zombie.setHealth(60D);
zombie.getEquipment().setItemInMainHand(axe.clone());
zombie.getEquipment().setItemInMainHandDropChance(0F);
diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/FlyingTNTSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/FlyingTNTSurprise.java
index 78af2fa..e10df5d 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/FlyingTNTSurprise.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/FlyingTNTSurprise.java
@@ -24,7 +24,7 @@ public void activate(Random random, Player p, Location l) {
for (int i = 0; i < 6; i++) {
Bat bat = (Bat) l.getWorld().spawnEntity(l, EntityType.BAT);
bat.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 999999999, 255));
- bat.getPassengers().add(l.getWorld().spawnEntity(l, EntityType.PRIMED_TNT));
+ bat.getPassengers().add(l.getWorld().spawnEntity(l, EntityType.TNT));
}
}
diff --git a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/TNTRainSurprise.java b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/TNTRainSurprise.java
index 0797bab..68e2418 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/TNTRainSurprise.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefunluckyblocks/surprises/unlucky/TNTRainSurprise.java
@@ -19,16 +19,16 @@ public String getName() {
@Override
public void activate(Random random, Player p, Location l) {
- l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.PRIMED_TNT).setVelocity(new Vector(0, 0.5, 0.15));
- l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.PRIMED_TNT).setVelocity(new Vector(0.15, 0.5, 0.15));
- l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.PRIMED_TNT).setVelocity(new Vector(0.15, 0.5, 0));
+ l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.TNT).setVelocity(new Vector(0, 0.5, 0.15));
+ l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.TNT).setVelocity(new Vector(0.15, 0.5, 0.15));
+ l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.TNT).setVelocity(new Vector(0.15, 0.5, 0));
- l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.PRIMED_TNT).setVelocity(new Vector(0, 0.5, -0.15));
- l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.PRIMED_TNT).setVelocity(new Vector(-0.15, 0.5, -0.15));
- l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.PRIMED_TNT).setVelocity(new Vector(-0.15, 0.5, 0));
+ l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.TNT).setVelocity(new Vector(0, 0.5, -0.15));
+ l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.TNT).setVelocity(new Vector(-0.15, 0.5, -0.15));
+ l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.TNT).setVelocity(new Vector(-0.15, 0.5, 0));
- l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.PRIMED_TNT).setVelocity(new Vector(-0.15, 0.5, 0.15));
- l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.PRIMED_TNT).setVelocity(new Vector(0.15, 0.5, -0.15));
+ l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.TNT).setVelocity(new Vector(-0.15, 0.5, 0.15));
+ l.getWorld().spawnEntity(l.add(0, 2, 0), EntityType.TNT).setVelocity(new Vector(0.15, 0.5, -0.15));
}
@Override
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 0127457..0d38dac 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
@@ -23,10 +23,10 @@ public final class WalshrusSurprise implements Surprise {
private final ItemStack sword;
public WalshrusSurprise() {
- 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);
+ sword = CustomItemStack.create(Material.GOLDEN_SWORD, "&e&lLucky Sword");
+ sword.addUnsafeEnchantment(Enchantment.SHARPNESS, 10);
+ sword.addUnsafeEnchantment(Enchantment.LOOTING, 10);
+ sword.addUnsafeEnchantment(Enchantment.UNBREAKING, 10);
sword.addUnsafeEnchantment(Enchantment.FIRE_ASPECT, 5);
}
@@ -38,7 +38,7 @@ public String getName() {
@Override
public void activate(Random random, Player p, Location l) {
Zombie zombie = (Zombie) l.getWorld().spawnEntity(l, EntityType.ZOMBIE);
- zombie.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(40D);
+ zombie.getAttribute(Attribute.MAX_HEALTH).setBaseValue(40D);
zombie.setHealth(40D);
zombie.getEquipment().setHelmet(PlayerHead.getItemStack(PlayerSkin.fromBase64("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzk2NmYwZWJkNzdmMWJjZDY1NmZhMmRjM2VmMDMwM2UyNmE2YTNkZTQ5OGMzOTk5ZDM5ZmRjYWNjNWY1YWQifX19")));