Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<version>UNOFFICIAL</version>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down Expand Up @@ -59,7 +59,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>3.3.0</version>

<configuration>

Expand Down Expand Up @@ -98,14 +98,14 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<version>1.21.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.github.TheBusyBiscuit</groupId>
<artifactId>Slimefun4</artifactId>
<version>RC-27</version>
<version>experimental-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
Expand All @@ -118,8 +118,8 @@
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
<version>2.2.1</version>
<version>3.1.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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==")));
Expand All @@ -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));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down
Loading