2019-07-08 18:39:57 +02:00
|
|
|
package com.songoda.ultimatestacker.lootables;
|
|
|
|
|
2019-09-09 18:08:04 +02:00
|
|
|
import com.songoda.core.compatibility.CompatibleMaterial;
|
2019-09-03 22:38:00 +02:00
|
|
|
import com.songoda.core.compatibility.ServerVersion;
|
2019-07-23 16:55:49 +02:00
|
|
|
import com.songoda.lootables.Lootables;
|
2019-07-23 16:55:56 +02:00
|
|
|
import com.songoda.lootables.Modify;
|
|
|
|
import com.songoda.lootables.loot.*;
|
2019-07-08 18:39:57 +02:00
|
|
|
import com.songoda.ultimatestacker.UltimateStacker;
|
2019-09-07 23:55:16 +02:00
|
|
|
import com.songoda.ultimatestacker.settings.Settings;
|
2019-10-08 19:16:19 +02:00
|
|
|
import org.bukkit.Bukkit;
|
2019-07-08 18:39:57 +02:00
|
|
|
import org.bukkit.Material;
|
2019-07-23 16:55:56 +02:00
|
|
|
import org.bukkit.enchantments.Enchantment;
|
2019-08-23 18:30:48 +02:00
|
|
|
import org.bukkit.entity.*;
|
|
|
|
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
2019-07-08 18:39:57 +02:00
|
|
|
|
2019-07-23 16:55:49 +02:00
|
|
|
import java.io.File;
|
2019-07-23 16:55:56 +02:00
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
2019-07-08 18:39:57 +02:00
|
|
|
|
2019-07-23 16:55:56 +02:00
|
|
|
public class LootablesManager {
|
2019-07-08 18:39:57 +02:00
|
|
|
|
2019-07-23 16:55:49 +02:00
|
|
|
private final Lootables instance;
|
2019-07-08 18:39:57 +02:00
|
|
|
|
2019-07-23 16:55:56 +02:00
|
|
|
private final LootManager lootManager;
|
2019-07-08 18:39:57 +02:00
|
|
|
|
2019-07-23 16:55:49 +02:00
|
|
|
private final String lootablesDir = UltimateStacker.getInstance().getDataFolder() + File.separator + "lootables";
|
2019-07-08 18:39:57 +02:00
|
|
|
|
2019-07-23 16:55:56 +02:00
|
|
|
public LootablesManager() {
|
|
|
|
this.instance = new Lootables(lootablesDir);
|
|
|
|
this.lootManager = new LootManager(instance);
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<Drop> getDrops(LivingEntity entity) {
|
|
|
|
List<Drop> toDrop = new ArrayList<>();
|
|
|
|
|
|
|
|
if (entity instanceof Ageable && !((Ageable) entity).isAdult()
|
|
|
|
|| !lootManager.getRegisteredLootables().containsKey(entity.getType().name())) return toDrop;
|
|
|
|
|
|
|
|
Lootable lootable = lootManager.getRegisteredLootables().get(entity.getType().name());
|
|
|
|
int looting = entity.getKiller() != null
|
|
|
|
&& entity.getKiller().getItemInHand().containsEnchantment(Enchantment.LOOT_BONUS_MOBS)
|
|
|
|
? entity.getKiller().getItemInHand().getEnchantmentLevel(Enchantment.LOOT_BONUS_MOBS)
|
|
|
|
: 0;
|
|
|
|
|
2019-09-07 23:55:16 +02:00
|
|
|
int rerollChance = Settings.REROLL.getBoolean() ? looting / (looting + 1) : 0;
|
2019-07-23 16:55:56 +02:00
|
|
|
|
|
|
|
for (Loot loot : lootable.getRegisteredLoot())
|
|
|
|
toDrop.addAll(runLoot(entity, loot, rerollChance, looting));
|
|
|
|
|
|
|
|
return toDrop;
|
|
|
|
}
|
|
|
|
|
|
|
|
private List<Drop> runLoot(LivingEntity entity, Loot loot, int rerollChance, int looting) {
|
|
|
|
Modify modify = null;
|
|
|
|
if (entity.getType() == EntityType.SHEEP) {
|
|
|
|
modify = (Loot loot2) -> {
|
|
|
|
Material material = loot2.getMaterial();
|
2019-08-30 01:30:13 +02:00
|
|
|
if (material.name().contains("WOOL") && ((Sheep) entity).getColor() != null) {
|
2019-07-23 16:55:56 +02:00
|
|
|
if (((Sheep) entity).isSheared()) return null;
|
|
|
|
if (instance.isServerVersionAtLeast(com.songoda.lootables.utils.ServerVersion.V1_13))
|
|
|
|
loot2.setMaterial(Material.valueOf(((Sheep) entity).getColor() + "_WOOL"));
|
|
|
|
else
|
|
|
|
loot2.setData((short) ((Sheep) entity).getColor().getWoolData());
|
|
|
|
|
|
|
|
}
|
|
|
|
return loot2;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2019-08-23 18:30:48 +02:00
|
|
|
EntityType killer = null;
|
|
|
|
if (entity.getLastDamageCause() instanceof EntityDamageByEntityEvent) {
|
|
|
|
Entity killerEntity = ((EntityDamageByEntityEvent) entity.getLastDamageCause()).getDamager();
|
|
|
|
killer = killerEntity.getType();
|
|
|
|
if (killerEntity instanceof Projectile) {
|
2019-08-30 01:30:13 +02:00
|
|
|
Projectile projectile = (Projectile) killerEntity;
|
|
|
|
if (projectile.getShooter() instanceof Entity) {
|
|
|
|
killer = ((Entity) projectile.getShooter()).getType();
|
|
|
|
}
|
2019-08-23 18:30:48 +02:00
|
|
|
}
|
|
|
|
}
|
2019-07-23 16:55:56 +02:00
|
|
|
return lootManager.runLoot(modify,
|
2019-10-08 19:16:19 +02:00
|
|
|
entity.getFireTicks() > 0,
|
2019-07-23 16:55:56 +02:00
|
|
|
entity.getKiller() != null ? entity.getKiller().getItemInHand() : null,
|
2019-08-23 18:30:48 +02:00
|
|
|
killer,
|
2019-07-23 16:55:56 +02:00
|
|
|
loot,
|
|
|
|
rerollChance,
|
|
|
|
looting);
|
|
|
|
}
|
|
|
|
|
2019-07-08 18:39:57 +02:00
|
|
|
public void createDefaultLootables() {
|
2019-09-03 22:38:00 +02:00
|
|
|
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_14)) {
|
2019-07-08 18:39:57 +02:00
|
|
|
// Add Trader Llama.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("TRADER_LLAMA",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.LEATHER)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build()));
|
|
|
|
|
|
|
|
// Add Pillager.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("PILLAGER",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.ARROW)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build()));
|
|
|
|
|
|
|
|
// Add Ravager.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("RAVAGER",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.SADDLE).build()));
|
|
|
|
|
|
|
|
// Add Cat.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("CAT",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.STRING).build()));
|
|
|
|
|
|
|
|
// Add Panda.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("PANDA",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.BAMBOO)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build()));
|
|
|
|
}
|
|
|
|
|
2019-09-03 22:38:00 +02:00
|
|
|
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_13)) {
|
2019-07-08 18:39:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
// Add Phantom.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("PHANTOM",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.PHANTOM_MEMBRANE)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(1)
|
|
|
|
.addOnlyDropFors(EntityType.PLAYER).build()));
|
|
|
|
|
|
|
|
// Add Pufferfish.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("PUFFERFISH",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.PUFFERFISH).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.BONE_MEAL)
|
|
|
|
.setChance(5).build()));
|
|
|
|
|
|
|
|
// Add Salmon.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("SALMON",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.SALMON)
|
|
|
|
.setBurnedMaterial(Material.COOKED_SALMON).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.BONE_MEAL)
|
|
|
|
.setChance(5).build()));
|
|
|
|
|
|
|
|
// Add Tropical Fish.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("TROPICAL_FISH",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.TROPICAL_FISH).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.BONE_MEAL)
|
|
|
|
.setChance(5).build(),
|
|
|
|
new LootBuilder()
|
2019-07-14 20:05:36 +02:00
|
|
|
.setMaterial(Material.BONE)
|
|
|
|
.setMin(1)
|
|
|
|
.setMax(2)
|
|
|
|
.setChance(25)
|
2019-07-08 18:39:57 +02:00
|
|
|
.addOnlyDropFors(EntityType.PLAYER).build()));
|
|
|
|
|
|
|
|
// Add Dolphin.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("DOLPHIN",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.COD)
|
|
|
|
.setBurnedMaterial(Material.COOKED_COD)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(1).build()));
|
|
|
|
|
|
|
|
// Add Cod.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("COD",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.COD)
|
|
|
|
.setBurnedMaterial(Material.COOKED_COD).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.BONE_MEAL)
|
|
|
|
.setChance(5).build()));
|
|
|
|
|
|
|
|
// Add Turtle.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("TURTLE",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.SEAGRASS)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build()));
|
|
|
|
|
|
|
|
// Add Drowned.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("DROWNED",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.ROTTEN_FLESH)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.GOLD_INGOT)
|
|
|
|
.setChance(5)
|
|
|
|
.addOnlyDropFors(EntityType.PLAYER).build()));
|
|
|
|
}
|
|
|
|
|
2019-09-03 22:38:00 +02:00
|
|
|
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_12)) {
|
2019-07-10 20:40:15 +02:00
|
|
|
// Add Parrot.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("PARROT",
|
2019-07-10 20:40:15 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.FEATHER)
|
|
|
|
.setMin(1)
|
|
|
|
.setMax(2).build()));
|
|
|
|
}
|
|
|
|
|
2019-07-08 18:39:57 +02:00
|
|
|
|
2019-09-03 23:08:30 +02:00
|
|
|
Loot fish1 = new LootBuilder()
|
2019-09-24 18:46:06 +02:00
|
|
|
.addChildLoot(new LootBuilder()
|
|
|
|
.setMaterial(CompatibleMaterial.COD.getMaterial())
|
|
|
|
.setBurnedMaterial(CompatibleMaterial.COOKED_COD.getMaterial())
|
|
|
|
.setChance(50).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.PRISMARINE_CRYSTALS)
|
|
|
|
.setChance(33).build())
|
|
|
|
.build();
|
2019-07-08 18:39:57 +02:00
|
|
|
|
2019-09-03 23:08:30 +02:00
|
|
|
Loot fish2 = new LootBuilder()
|
2019-07-08 18:39:57 +02:00
|
|
|
.setChance(2.5)
|
|
|
|
.addChildLoot(new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.COD.getMaterial())
|
|
|
|
.setData(CompatibleMaterial.COD.getData())
|
2019-07-08 18:39:57 +02:00
|
|
|
.setChance(60)
|
|
|
|
.setAllowLootingEnchant(false).build(),
|
|
|
|
new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.SALMON.getMaterial())
|
|
|
|
.setData(CompatibleMaterial.SALMON.getData())
|
2019-07-08 18:39:57 +02:00
|
|
|
.setChance(25)
|
|
|
|
.setAllowLootingEnchant(false).build(),
|
|
|
|
new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.PUFFERFISH.getMaterial())
|
|
|
|
.setData(CompatibleMaterial.PUFFERFISH.getData())
|
2019-07-08 18:39:57 +02:00
|
|
|
.setChance(13)
|
|
|
|
.setAllowLootingEnchant(false).build(),
|
|
|
|
new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.TROPICAL_FISH.getMaterial())
|
|
|
|
.setData(CompatibleMaterial.TROPICAL_FISH.getData())
|
2019-07-08 18:39:57 +02:00
|
|
|
.setChance(2)
|
|
|
|
.setAllowLootingEnchant(false).build())
|
2019-09-03 23:08:30 +02:00
|
|
|
.addOnlyDropFors(EntityType.PLAYER).build();
|
2019-07-08 18:39:57 +02:00
|
|
|
|
2019-09-03 22:38:00 +02:00
|
|
|
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_11)) {
|
2019-07-08 18:39:57 +02:00
|
|
|
// Add Zombie Villager.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("ZOMBIE_VILLAGER",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.ROTTEN_FLESH)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setChance(2.5)
|
|
|
|
.setChildDropCount(1)
|
|
|
|
.addOnlyDropFors(EntityType.PLAYER)
|
|
|
|
.addChildLoot(new LootBuilder().setMaterial(Material.IRON_INGOT)
|
|
|
|
.setAllowLootingEnchant(false).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.CARROT)
|
|
|
|
.setAllowLootingEnchant(false).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.POTATO)
|
|
|
|
.setAllowLootingEnchant(false).build())
|
|
|
|
.build()));
|
|
|
|
|
2019-07-08 21:42:19 +02:00
|
|
|
// Add Llama.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("LLAMA",
|
2019-07-08 21:42:19 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.LEATHER)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build()));
|
|
|
|
|
2019-07-08 18:39:57 +02:00
|
|
|
// Add Zombie Horse.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("ZOMBIE_HORSE",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.ROTTEN_FLESH)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build()));
|
|
|
|
// Add Elder Guardian.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("ELDER_GUARDIAN",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.PRISMARINE_SHARD)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
fish1,
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.SPONGE)
|
|
|
|
.addOnlyDropFors(EntityType.PLAYER)
|
|
|
|
.setAllowLootingEnchant(false).build(),
|
|
|
|
fish2));
|
|
|
|
|
|
|
|
// Add Mule.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("MULE",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.LEATHER)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build()));
|
|
|
|
|
|
|
|
// Add Stray.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("STRAY",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.ARROW)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.BONE)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build()));
|
|
|
|
|
2019-09-03 23:08:30 +02:00
|
|
|
Loot witherSkull = new LootBuilder()
|
2019-09-24 18:46:06 +02:00
|
|
|
.setMaterial(CompatibleMaterial.WITHER_SKELETON_SKULL.getMaterial())
|
|
|
|
.setData(CompatibleMaterial.WITHER_SKELETON_SKULL.getData())
|
|
|
|
.setChance(2.5)
|
|
|
|
.setAllowLootingEnchant(false)
|
|
|
|
.addOnlyDropFors(EntityType.PLAYER).build();
|
2019-07-08 18:39:57 +02:00
|
|
|
|
|
|
|
// Add Wither Skeleton.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("WITHER_SKELETON",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.COAL)
|
|
|
|
.setChance(33).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.BONE)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
witherSkull)); // Add Skeleton Horse.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("SKELETON_HORSE",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.BONE)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build()));
|
|
|
|
|
|
|
|
// Add Donkey.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("DONKEY",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.LEATHER)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build()));
|
|
|
|
|
|
|
|
// Add Vindicator.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("VINDICATOR",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.EMERALD)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(1)
|
|
|
|
.addOnlyDropFors(EntityType.PLAYER).build()));
|
|
|
|
|
|
|
|
// Add Evoker.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("EVOKER",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.TOTEM_OF_UNDYING.getMaterial())
|
2019-07-08 18:39:57 +02:00
|
|
|
.setAllowLootingEnchant(false).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.EMERALD)
|
|
|
|
.setChance(50)
|
|
|
|
.addOnlyDropFors(EntityType.PLAYER).build()));
|
|
|
|
}
|
|
|
|
|
2019-09-03 22:38:00 +02:00
|
|
|
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_11)) {
|
2019-07-08 18:39:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
// Shulker.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("SHULKER",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.SHULKER_SHELL)
|
|
|
|
.setChance(50)
|
|
|
|
.setLootingIncrease(6.25).build()));
|
|
|
|
}
|
|
|
|
|
2019-09-03 22:38:00 +02:00
|
|
|
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_13)) {
|
2019-07-08 18:39:57 +02:00
|
|
|
// Add Polar Bear.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("POLAR_BEAR",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.COD)
|
|
|
|
.setChance(75)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.SALMON)
|
|
|
|
.setChance(25)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build()));
|
2019-09-03 22:38:00 +02:00
|
|
|
} else if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_10)) {
|
2019-07-08 18:39:57 +02:00
|
|
|
// Add Polar Bear.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("POLAR_BEAR",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.COD.getMaterial())
|
2019-07-08 18:39:57 +02:00
|
|
|
.setChance(75)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.SALMON.getMaterial())
|
|
|
|
.setData(CompatibleMaterial.SALMON.getData())
|
2019-07-08 18:39:57 +02:00
|
|
|
.setChance(25)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build()));
|
|
|
|
}
|
|
|
|
|
|
|
|
// Add Pig.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("PIG",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.PORKCHOP.getMaterial())
|
|
|
|
.setBurnedMaterial(CompatibleMaterial.COOKED_PORKCHOP.getMaterial())
|
2019-07-08 18:39:57 +02:00
|
|
|
.setMin(1)
|
|
|
|
.setMax(3).build()));
|
|
|
|
|
|
|
|
|
|
|
|
// Add Cow.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("COW",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.LEATHER)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.BEEF.getMaterial())
|
|
|
|
.setBurnedMaterial(CompatibleMaterial.COOKED_BEEF.getMaterial())
|
2019-07-08 18:39:57 +02:00
|
|
|
.setMin(1)
|
|
|
|
.setMax(3).build()));
|
|
|
|
|
|
|
|
// Add Mushroom Cow.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("MUSHROOM_COW",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.LEATHER)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.BEEF.getMaterial())
|
|
|
|
.setBurnedMaterial(CompatibleMaterial.COOKED_BEEF.getMaterial())
|
2019-07-08 18:39:57 +02:00
|
|
|
.setMin(1)
|
|
|
|
.setMax(3).build()));
|
|
|
|
|
|
|
|
// Add Chicken.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("CHICKEN",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.FEATHER)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.CHICKEN.getMaterial())
|
|
|
|
.setBurnedMaterial(CompatibleMaterial.COOKED_CHICKEN.getMaterial()).build()));
|
2019-07-08 18:39:57 +02:00
|
|
|
// Add Zombie.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("ZOMBIE",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.ROTTEN_FLESH)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setChance(2.5)
|
|
|
|
.setChildDropCount(1)
|
|
|
|
.setAllowLootingEnchant(false)
|
|
|
|
.addOnlyDropFors(EntityType.PLAYER)
|
|
|
|
.addChildLoot(new LootBuilder().setMaterial(Material.IRON_INGOT)
|
|
|
|
.setAllowLootingEnchant(false).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.CARROT)
|
|
|
|
.setAllowLootingEnchant(false).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.POTATO)
|
|
|
|
.setAllowLootingEnchant(false).build())
|
|
|
|
.build()));
|
|
|
|
|
|
|
|
// Add Husk.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("ZOMBIE",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.ROTTEN_FLESH)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setChance(2.5)
|
|
|
|
.setChildDropCount(1)
|
|
|
|
.setAllowLootingEnchant(false)
|
|
|
|
.addOnlyDropFors(EntityType.PLAYER)
|
|
|
|
.addChildLoot(new LootBuilder().setMaterial(Material.IRON_INGOT)
|
|
|
|
.setAllowLootingEnchant(false).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.CARROT)
|
|
|
|
.setAllowLootingEnchant(false).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.POTATO)
|
|
|
|
.setAllowLootingEnchant(false).build())
|
|
|
|
.build()));
|
|
|
|
|
|
|
|
Loot discs;
|
2019-09-03 22:38:00 +02:00
|
|
|
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_13)) {
|
2019-07-08 18:39:57 +02:00
|
|
|
discs = new LootBuilder()
|
|
|
|
.setChildDropCount(1)
|
|
|
|
.addOnlyDropFors(EntityType.SKELETON,
|
|
|
|
EntityType.STRAY)
|
|
|
|
.addChildLoot(new LootBuilder().setMaterial(Material.MUSIC_DISC_11).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.MUSIC_DISC_13).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.MUSIC_DISC_BLOCKS).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.MUSIC_DISC_CAT).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.MUSIC_DISC_CHIRP).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.MUSIC_DISC_FAR).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.MUSIC_DISC_MALL).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.MUSIC_DISC_MELLOHI).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.MUSIC_DISC_STAL).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.MUSIC_DISC_STRAD).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.MUSIC_DISC_WAIT).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.MUSIC_DISC_WARD).build())
|
|
|
|
.build();
|
2019-09-03 22:38:00 +02:00
|
|
|
} else if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_11)) {
|
2019-07-08 18:39:57 +02:00
|
|
|
discs = new LootBuilder()
|
|
|
|
.setChildDropCount(1)
|
|
|
|
.addOnlyDropFors(EntityType.SKELETON,
|
|
|
|
EntityType.STRAY)
|
|
|
|
.addChildLoot(new LootBuilder().setMaterial(Material.valueOf("GOLD_RECORD")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("GREEN_RECORD")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_3")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_4")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_5")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_6")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_7")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_8")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_9")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_10")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_11")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_12")).build())
|
|
|
|
.build();
|
|
|
|
} else {
|
|
|
|
discs = new LootBuilder()
|
|
|
|
.setChildDropCount(1)
|
|
|
|
.addOnlyDropFors(EntityType.SKELETON)
|
|
|
|
.addChildLoot(new LootBuilder().setMaterial(Material.valueOf("GOLD_RECORD")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("GREEN_RECORD")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_3")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_4")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_5")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_6")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_7")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_8")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_9")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_10")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_11")).build(),
|
|
|
|
new LootBuilder().setMaterial(Material.valueOf("RECORD_12")).build())
|
|
|
|
.build();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Add Creeper.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("CREEPER",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.GUNPOWDER.getMaterial())
|
2019-07-08 18:39:57 +02:00
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
discs));
|
|
|
|
|
|
|
|
// Add Guardian.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("GUARDIAN",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.PRISMARINE_SHARD)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
fish1,
|
|
|
|
fish2));
|
|
|
|
|
|
|
|
// Add Witch.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("WITCH",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setChildDropCounMin(1)
|
|
|
|
.setChildDropCountMax(3)
|
|
|
|
.addChildLoot(new LootBuilder()
|
|
|
|
.setMaterial(Material.GLOWSTONE_DUST)
|
|
|
|
.setChance(12.5)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.SUGAR)
|
|
|
|
.setChance(12.5)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.REDSTONE)
|
|
|
|
.setChance(12.5)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.SPIDER_EYE)
|
|
|
|
.setChance(12.5)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.GLASS_BOTTLE)
|
|
|
|
.setChance(12.5)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.GUNPOWDER.getMaterial())
|
2019-07-08 18:39:57 +02:00
|
|
|
.setChance(12.5)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.STICK)
|
|
|
|
.setChance(25)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build()
|
|
|
|
).build()));
|
|
|
|
|
|
|
|
// Add Sheep.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("SHEEP",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.MUTTON)
|
|
|
|
.setBurnedMaterial(Material.COOKED_MUTTON)
|
|
|
|
.setMin(1)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.WHITE_WOOL.getMaterial())
|
2019-07-08 18:39:57 +02:00
|
|
|
.setMin(2)
|
|
|
|
.setMax(2).build()));
|
|
|
|
|
|
|
|
// Add Squid.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("SQUID",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.INK_SAC.getMaterial())
|
2019-07-08 18:39:57 +02:00
|
|
|
.setMin(1)
|
|
|
|
.setMax(3).build()));
|
|
|
|
|
|
|
|
// Add Spider.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("SPIDER",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.STRING)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.SPIDER_EYE)
|
|
|
|
.setChance(33)
|
|
|
|
.addOnlyDropFors(EntityType.PLAYER).build()));
|
|
|
|
|
|
|
|
// Add Cave Spider.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("CAVE_SPIDER",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.STRING)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.SPIDER_EYE)
|
|
|
|
.setChance(33)
|
|
|
|
.addOnlyDropFors(EntityType.PLAYER).build()));
|
|
|
|
|
|
|
|
// Add Enderman.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("ENDERMAN",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.ENDER_PEARL)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(1).build()));
|
|
|
|
|
|
|
|
// Add Blaze.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("BLAZE",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.BLAZE_ROD)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(1)
|
|
|
|
.addOnlyDropFors(EntityType.PLAYER).build()));
|
|
|
|
|
|
|
|
// Add Horse.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("HORSE",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.LEATHER)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build()));
|
|
|
|
|
|
|
|
// Magma Cube.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("MAGMA_CUBE",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.MAGMA_CREAM)
|
|
|
|
.setChance(25).build()));
|
|
|
|
// Add Skeleton.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("SKELETON",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.ARROW)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.BONE)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build()));
|
|
|
|
|
|
|
|
// Add Snowman.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("SNOWMAN",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.SNOWBALL.getMaterial())
|
2019-07-08 18:39:57 +02:00
|
|
|
.setMin(0)
|
|
|
|
.setMax(15).build()));
|
|
|
|
|
|
|
|
// Add Rabbit.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("RABBIT",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.RABBIT_HIDE)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(1).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.RABBIT)
|
|
|
|
.setBurnedMaterial(Material.COOKED_RABBIT)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(1).build()));
|
|
|
|
|
|
|
|
// Add Iron Golem.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("IRON_GOLEM",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.POPPY.getMaterial())
|
2019-07-08 18:39:57 +02:00
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.IRON_INGOT)
|
|
|
|
.setMin(3)
|
|
|
|
.setMax(5).build()));
|
|
|
|
|
|
|
|
// Add Slime.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("SLIME",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.SLIME_BALL)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(2).build()));
|
|
|
|
|
|
|
|
// Add Ghast.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("GHAST",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.GHAST_TEAR)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(1).build(),
|
|
|
|
new LootBuilder()
|
2019-09-09 18:08:04 +02:00
|
|
|
.setMaterial(CompatibleMaterial.GUNPOWDER.getMaterial())
|
2019-07-08 18:39:57 +02:00
|
|
|
.setMin(0)
|
2019-07-10 20:40:15 +02:00
|
|
|
.setMax(2).build()));
|
2019-07-08 18:39:57 +02:00
|
|
|
|
|
|
|
// Add Zombie Pigman
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("PIG_ZOMBIE",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.ROTTEN_FLESH)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(1).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.GOLD_NUGGET)
|
|
|
|
.setMin(0)
|
|
|
|
.setMax(1).build(),
|
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.GOLD_INGOT)
|
|
|
|
.setChance(2.5)
|
|
|
|
.addOnlyDropFors(EntityType.PLAYER).build()));
|
|
|
|
|
|
|
|
// Add Wither.
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.addLootable(new Lootable("WITHER",
|
2019-07-08 18:39:57 +02:00
|
|
|
new LootBuilder()
|
|
|
|
.setMaterial(Material.NETHER_STAR)
|
|
|
|
.setAllowLootingEnchant(false).build()));
|
|
|
|
|
2019-10-15 17:41:46 +02:00
|
|
|
// Add Villager.
|
|
|
|
lootManager.addLootable(new Lootable("VILLAGER",
|
|
|
|
new LootBuilder().build()));
|
|
|
|
|
|
|
|
// Add Silverfish.
|
|
|
|
lootManager.addLootable(new Lootable("SILVERFISH",
|
|
|
|
new LootBuilder().build()));
|
|
|
|
|
2019-07-23 16:55:56 +02:00
|
|
|
lootManager.saveLootables();
|
|
|
|
}
|
2019-07-08 18:39:57 +02:00
|
|
|
|
2019-07-23 16:55:56 +02:00
|
|
|
public LootManager getLootManager() {
|
|
|
|
return lootManager;
|
2019-07-08 18:39:57 +02:00
|
|
|
}
|
|
|
|
}
|