diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/GoldLoot.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/GoldLoot.java index 1691be02e..38624951f 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/GoldLoot.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/GoldLoot.java @@ -23,7 +23,7 @@ public class GoldLoot implements ILoot public void dropLoot(Location location) { int count = _min + UtilMath.r(_max - _min); - _goldManager.dropGold(location.clone().add(0, 3, 0), count); + _goldManager.dropGold(location.clone().add(0, 1, 0), count); } @Override diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/ItemLoot.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/ItemLoot.java index 52677280f..1eaec5abb 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/ItemLoot.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/ItemLoot.java @@ -8,10 +8,9 @@ import mineplex.core.common.util.UtilMath; public class ItemLoot implements ILoot { - private Material _material; - private byte _data; - private int _min; - private int _max; + private final Material _material; + private final byte _data; + private final int _min, _max; public ItemLoot(Material material) { @@ -34,9 +33,7 @@ public class ItemLoot implements ILoot @Override public void dropLoot(Location location) { - int count = UtilMath.rRange(_min, _max); - ItemStack item = new ItemStack(_material, count, (short) 0, _data); - location.getWorld().dropItemNaturally(location.clone().add(0, 3, 0), item); + location.getWorld().dropItemNaturally(location.clone().add(0, 1, 0), getItemStack()); } @Override diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/LootManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/LootManager.java index 23cfc00b2..be424ddd3 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/LootManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/LootManager.java @@ -11,8 +11,8 @@ import mineplex.game.clans.items.GearManager; public class LootManager { - private GearManager _gearManager; - private GoldManager _goldManager; + private final GearManager _gearManager; + private final GoldManager _goldManager; private WeightSet _commonSet; private WeightSet _rareSet; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/undead/CityChest.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/undead/CityChest.java index de7068ca5..00d88d283 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/undead/CityChest.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/undead/CityChest.java @@ -39,7 +39,7 @@ public class CityChest { _block.setType(Material.AIR); _block.getWorld().playEffect(_block.getLocation(), Effect.STEP_SOUND, Material.ENDER_CHEST.getId()); - ClansManager.getInstance().getLootManager().dropUndeadCity(_block.getLocation()); + ClansManager.getInstance().getLootManager().dropUndeadCity(_block.getLocation().add(0.5, 0, 0.5)); _opened = true; } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/undead/UndeadCity.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/undead/UndeadCity.java index fafdb4a2b..5a2ea2225 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/undead/UndeadCity.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/undead/UndeadCity.java @@ -33,6 +33,7 @@ import mineplex.game.clans.clans.worldevent.undead.creature.UndeadWarrior; public class UndeadCity extends WorldEvent { + private final int _maxChests; private final int _maxMobs; private final Map _chests = new HashMap<>(); @@ -58,7 +59,9 @@ public class UndeadCity extends WorldEvent { int addedChests = 0; int addedMobs = 0; - for (Block block : UtilBlock.getInRadius(getCenterLocation(), 55).keySet()) + double size = getEventArena().getRadius(); + + for (Block block : UtilBlock.getInBoundingBox(getCenterLocation().clone().add(size, size, size), getCenterLocation().clone().subtract(size, size, size))) { if (block.getType() == Material.ENDER_CHEST) {