Remove duplicate openLootChest() function.

dev
sigonasr2 11 years ago
parent e05cdbe5cf
commit 972d217589
  1. 34
      BankEconomyMod/bin/me/kaZep/Base/.gitignore
  2. 4
      BankEconomyMod/bin/me/kaZep/Commands/.gitignore
  3. 4
      BankEconomyMod/bin/sig/ItemSets/.gitignore
  4. 2
      BankEconomyMod/src/me/kaZep/Base/.gitignore
  5. 64
      BankEconomyMod/src/me/kaZep/Base/PlayerListener.java

@ -0,0 +1,34 @@
/._PlayerListener.java1265619304918501342.tmp
/._PlayerListener.java3998199996590245987.tmp
/Main.class
/Main$1.class
/Main$2.class
/Main$3.class
/Main$4.class
/PlayerBuffData.class
/PlayerListener.class
/PlayerListener$1.class
/PlayerListener$10.class
/PlayerListener$11.class
/PlayerListener$12.class
/PlayerListener$13.class
/PlayerListener$14.class
/PlayerListener$15.class
/PlayerListener$16.class
/PlayerListener$17.class
/PlayerListener$18.class
/PlayerListener$19.class
/PlayerListener$2.class
/PlayerListener$20.class
/PlayerListener$21.class
/PlayerListener$22.class
/PlayerListener$3.class
/PlayerListener$4.class
/PlayerListener$5.class
/PlayerListener$6.class
/PlayerListener$7.class
/PlayerListener$8.class
/PlayerListener$9.class
/PlayerListener$Cube.class
/RecyclingCenterNode.class
/updateInventoryTask.class

@ -0,0 +1,4 @@
/commandBankEconomy.class
/commandBankEconomy$6.class
/commandBankEconomy$7.class
/commandBankEconomy$8.class

@ -0,0 +1,4 @@
/ColorSet.class
/ItemSet.class
/ItemSetList.class
/ItemSetList$Armor.class

@ -0,0 +1,2 @@
/._PlayerListener.java1265619304918501342.tmp
/._PlayerListener.java3998199996590245987.tmp

@ -5756,70 +5756,6 @@ implements Listener
}break;
}
}
public void open_LootChest(int tier, Location loc) {
// 1 = single item
// 2 = mythic item
// 3 = plentiful items
// 4 = multiple items
switch (tier) {
case 1: {
loc.getWorld().dropItemNaturally(loc, getGoodie(0));
}break;
case 2: {
loc.getWorld().dropItemNaturally(loc, getGoodie(1));
}break;
case 3: {
if (Math.random() < 0.1) {
loc.getWorld().dropItemNaturally(loc, new ItemStack(Material.LOG, (int)(Math.random() * 64) + 1));
} else
if (Math.random() < 0.1) {
loc.getWorld().dropItemNaturally(loc, new ItemStack(Material.RAW_FISH, (int)(Math.random() * 64) + 1));
} else
if (Math.random() < 0.1) {
loc.getWorld().dropItemNaturally(loc, new ItemStack(Material.BOOKSHELF, (int)(Math.random() * 64) + 1));
} else
if (Math.random() < 0.1) {
loc.getWorld().dropItemNaturally(loc, new ItemStack(Material.CLAY, (int)(Math.random() * 64) + 1));
} else
if (Math.random() < 0.1) {
loc.getWorld().dropItemNaturally(loc, new ItemStack(Material.EXP_BOTTLE, (int)(Math.random() * 64) + 1));
} else
if (Math.random() < 0.1) {
loc.getWorld().dropItemNaturally(loc, new ItemStack(Material.OBSIDIAN, (int)(Math.random() * 64) + 1));
} else
if (Math.random() < 0.1) {
loc.getWorld().dropItemNaturally(loc, new ItemStack(Material.MOSSY_COBBLESTONE, (int)(Math.random() * 64) + 1));
} else
if (Math.random() < 0.1) {
loc.getWorld().dropItemNaturally(loc, new ItemStack(Material.HAY_BLOCK, (int)(Math.random() * 64) + 1));
} else
if (Math.random() < 0.1) {
loc.getWorld().dropItemNaturally(loc, new ItemStack(Material.QUARTZ_BLOCK, (int)(Math.random() * 64) + 1));
} else
if (Math.random() < 0.1) {
loc.getWorld().dropItemNaturally(loc, new ItemStack(Material.NETHER_BRICK, (int)(Math.random() * 64) + 1));
} else {
loc.getWorld().dropItemNaturally(loc, new ItemStack(Material.WOOL, (int)(Math.random() * 64) + 1));
}
}break;
case 4: {
// Drop at least one stack, and five rolls for a 20% chance at an extra stack.
loc.getWorld().dropItemNaturally(loc, getGoodie(0));
for (int i = 0; i < 5; i++) {
if (Math.random() < 0.2) {
loc.getWorld().dropItemNaturally(loc, getGoodie(0));
}
}
}break;
case 5: {
// OMG NOT CODED YET WTF THIS SHOULDN'T HAPPEN
}break;
}
}
public ItemStack getGoodie() {
return getGoodie(0);

Loading…
Cancel
Save