Fix up more issues from testing
This commit is contained in:
parent
35c932048f
commit
f11f95a3d7
@ -205,15 +205,20 @@ public abstract class Skywars extends Game
|
||||
.addItem(new ItemStack(Material.GOLD_CHESTPLATE))
|
||||
.addItem(new ItemStack(Material.GOLD_LEGGINGS))
|
||||
.addItem(new ItemStack(Material.GOLD_BOOTS))
|
||||
.setAmountsPerChest(1, 2)
|
||||
.setAmountsPerChest(2, 3)
|
||||
,
|
||||
|
||||
new ChestLootPool()
|
||||
.addItem(new ItemStack(Material.WOOD_SWORD))
|
||||
.addItem(new ItemStack(Material.STONE_SWORD))
|
||||
.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 1)
|
||||
.addEnchantment(Enchantment.PROTECTION_PROJECTILE, 1)
|
||||
.setEnchantmentRarity(0.5)
|
||||
,
|
||||
|
||||
new ChestLootPool()
|
||||
.addItem(new ItemStack(Material.STONE_AXE))
|
||||
.addItem(new ItemStack(Material.STONE_SPADE))
|
||||
.setAmountsPerChest(1, 2)
|
||||
.setProbability(0.8)
|
||||
,
|
||||
|
||||
@ -294,6 +299,7 @@ public abstract class Skywars extends Game
|
||||
.addItem(new ItemStack(Material.LAVA_BUCKET), 80)
|
||||
.addItem(new ItemStack(Material.WATER_BUCKET))
|
||||
.addItem(new ItemStack(Material.ENDER_PEARL), 1, 2)
|
||||
.setAmountsPerChest(1, 2)
|
||||
,
|
||||
|
||||
new ChestLootPool()
|
||||
@ -312,10 +318,10 @@ public abstract class Skywars extends Game
|
||||
.addItem(new ItemStack(Material.IRON_CHESTPLATE))
|
||||
.addItem(new ItemStack(Material.IRON_LEGGINGS))
|
||||
.addItem(new ItemStack(Material.IRON_BOOTS))
|
||||
.addItem(new ItemStack(Material.DIAMOND_HELMET), 30)
|
||||
.addItem(new ItemStack(Material.DIAMOND_CHESTPLATE), 30)
|
||||
.addItem(new ItemStack(Material.DIAMOND_LEGGINGS), 30)
|
||||
.addItem(new ItemStack(Material.DIAMOND_BOOTS), 30)
|
||||
.addItem(new ItemStack(Material.DIAMOND_HELMET), 20)
|
||||
.addItem(new ItemStack(Material.DIAMOND_CHESTPLATE), 20)
|
||||
.addItem(new ItemStack(Material.DIAMOND_LEGGINGS), 20)
|
||||
.addItem(new ItemStack(Material.DIAMOND_BOOTS), 20)
|
||||
.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2)
|
||||
.addEnchantment(Enchantment.PROTECTION_PROJECTILE, 2)
|
||||
.setAmountsPerChest(1, 2)
|
||||
@ -329,7 +335,7 @@ public abstract class Skywars extends Game
|
||||
,
|
||||
|
||||
new ChestLootPool()
|
||||
.addItem(new ItemStack(Material.DIAMOND_SWORD))
|
||||
.addItem(new ItemStack(Material.DIAMOND_SWORD), 30)
|
||||
.addItem(new ItemStack(Material.DIAMOND), 1, 3)
|
||||
.addItem(new ItemStack(Material.STICK), 1, 3)
|
||||
.setProbability(0.4)
|
||||
@ -370,7 +376,7 @@ public abstract class Skywars extends Game
|
||||
.addItem(new ItemStack(Material.WATER_BUCKET))
|
||||
.addItem(new ItemStack(Material.ENDER_PEARL), 1, 2)
|
||||
.addItem(new ItemStack(Material.MUSHROOM_SOUP))
|
||||
.setAmountsPerChest(1, 2)
|
||||
.setAmountsPerChest(1, 3)
|
||||
,
|
||||
|
||||
new ChestLootPool()
|
||||
@ -444,7 +450,7 @@ public abstract class Skywars extends Game
|
||||
}
|
||||
|
||||
// Store which chests are closest to which spawn
|
||||
NautHashMap<Location, ArrayList<Location>> islandOres = new NautHashMap<Location, ArrayList<Location>>();
|
||||
NautHashMap<Location, ArrayList<Location>> islandOres = new NautHashMap<>();
|
||||
|
||||
// Allocate chests to their nearest spawn point
|
||||
for (Location oreLoc : WorldData.GetCustomLocs("56"))
|
||||
@ -553,7 +559,7 @@ public abstract class Skywars extends Game
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void blockBreakBonusDrops(BlockBreakEvent event)
|
||||
{
|
||||
event.setExpToDrop(0);
|
||||
@ -577,7 +583,8 @@ public abstract class Skywars extends Game
|
||||
if (toDrop != null)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
block.breakNaturally(toDrop);
|
||||
block.setType(Material.AIR);
|
||||
block.getWorld().dropItemNaturally(block.getLocation().add(0.5, 0.5, 0.5), toDrop);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,6 +41,7 @@ public class PerkVoidSaver extends SkywarsPerk
|
||||
return;
|
||||
}
|
||||
|
||||
player.setItemInHand(null);
|
||||
player.teleport(location.add(0, 2, 0));
|
||||
player.setFallDistance(0);
|
||||
player.getInventory().remove(Material.EYE_OF_ENDER);
|
||||
|
@ -50,6 +50,7 @@ public abstract class SkywarsPerk extends Perk
|
||||
return;
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
onUseItem(player);
|
||||
}
|
||||
|
||||
|
@ -50,6 +50,12 @@ public class MapCrumbleModule extends Module
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
if (!getGame().equals(getGame().getArcadeManager().GetGame()))
|
||||
{
|
||||
cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
World world = worldData.World;
|
||||
|
||||
for (int x = worldData.MinX; x < worldData.MaxX; x++)
|
||||
|
@ -9,7 +9,7 @@ public class ChestLootItem
|
||||
private ItemStack _item;
|
||||
private int _lowestAmount, _highestAmount;
|
||||
|
||||
public ChestLootItem(ItemStack item, int lowestAmount, int highestAmount)
|
||||
ChestLootItem(ItemStack item, int lowestAmount, int highestAmount)
|
||||
{
|
||||
_item = item;
|
||||
_lowestAmount = lowestAmount;
|
||||
|
Loading…
Reference in New Issue
Block a user