diff --git a/BankEconomyMod/src/me/kaZep/Base/EnchantLevelDatabase.java b/BankEconomyMod/src/me/kaZep/Base/EnchantLevelDatabase.java index fa7253c..47bd956 100644 --- a/BankEconomyMod/src/me/kaZep/Base/EnchantLevelDatabase.java +++ b/BankEconomyMod/src/me/kaZep/Base/EnchantLevelDatabase.java @@ -414,5 +414,56 @@ public class EnchantLevelDatabase { diamond_chestplate.add(new StoreValues(0.081,Enchantment.PROTECTION_PROJECTILE,2,10)); diamond_chestplate.add(new StoreValues(0.026,Enchantment.PROTECTION_FIRE,1,10)); diamond_chestplate.add(new StoreValues(0.021,Enchantment.THORNS,1,10)); + chain_helmet.add(new StoreValues(0.471,Enchantment.PROTECTION_ENVIRONMENTAL,1,5)); + chain_helmet.add(new StoreValues(0.161,Enchantment.WATER_WORKER,1,5)); + chain_helmet.add(new StoreValues(0.16,Enchantment.PROTECTION_PROJECTILE,1,5)); + chain_helmet.add(new StoreValues(0.092,Enchantment.PROTECTION_EXPLOSIONS,1,5)); + chain_helmet.add(new StoreValues(0.072,Enchantment.PROTECTION_PROJECTILE,2,5)); + chain_helmet.add(new StoreValues(0.022,Enchantment.PROTECTION_FIRE,1,5)); + chain_helmet.add(new StoreValues(0.015,Enchantment.OXYGEN,1,5)); + chain_boots.add(new StoreValues(0.41,Enchantment.PROTECTION_ENVIRONMENTAL,1,5)); + chain_boots.add(new StoreValues(0.265,Enchantment.PROTECTION_FALL,1,5)); + chain_boots.add(new StoreValues(0.143,Enchantment.PROTECTION_PROJECTILE,1,5)); + chain_boots.add(new StoreValues(0.082,Enchantment.PROTECTION_EXPLOSIONS,1,5)); + chain_boots.add(new StoreValues(0.065,Enchantment.PROTECTION_PROJECTILE,2,5)); + chain_boots.add(new StoreValues(0.022,Enchantment.PROTECTION_FIRE,1,5)); + chain_boots.add(new StoreValues(0.006,Enchantment.PROTECTION_FALL,2,5)); + chain_leggings.add(new StoreValues(0.523,Enchantment.PROTECTION_ENVIRONMENTAL,1,5)); + chain_leggings.add(new StoreValues(0.178,Enchantment.PROTECTION_PROJECTILE,1,5)); + chain_leggings.add(new StoreValues(0.101,Enchantment.PROTECTION_EXPLOSIONS,1,5)); + chain_leggings.add(new StoreValues(0.083,Enchantment.PROTECTION_PROJECTILE,2,5)); + chain_leggings.add(new StoreValues(0.025,Enchantment.PROTECTION_FIRE,1,5)); + chain_chestplate.add(new StoreValues(0.525,Enchantment.PROTECTION_ENVIRONMENTAL,1,5)); + chain_chestplate.add(new StoreValues(0.172,Enchantment.PROTECTION_PROJECTILE,1,5)); + chain_chestplate.add(new StoreValues(0.10,Enchantment.PROTECTION_EXPLOSIONS,1,5)); + chain_chestplate.add(new StoreValues(0.083,Enchantment.PROTECTION_PROJECTILE,2,5)); + chain_chestplate.add(new StoreValues(0.025,Enchantment.PROTECTION_FIRE,1,5)); + chain_chestplate.add(new StoreValues(0.019,Enchantment.THORNS,1,5)); + chain_boots.add(new StoreValues(0.41,Enchantment.PROTECTION_ENVIRONMENTAL,1,10)); + chain_boots.add(new StoreValues(0.265,Enchantment.PROTECTION_FALL,1,10)); + chain_boots.add(new StoreValues(0.143,Enchantment.PROTECTION_PROJECTILE,1,10)); + chain_boots.add(new StoreValues(0.082,Enchantment.PROTECTION_EXPLOSIONS,1,10)); + chain_boots.add(new StoreValues(0.065,Enchantment.PROTECTION_PROJECTILE,2,10)); + chain_boots.add(new StoreValues(0.022,Enchantment.PROTECTION_FIRE,1,10)); + chain_boots.add(new StoreValues(0.006,Enchantment.PROTECTION_FALL,2,10)); + chain_helmet.add(new StoreValues(0.471,Enchantment.PROTECTION_ENVIRONMENTAL,1,10)); + chain_helmet.add(new StoreValues(0.161,Enchantment.WATER_WORKER,1,10)); + chain_helmet.add(new StoreValues(0.16,Enchantment.PROTECTION_PROJECTILE,1,10)); + chain_helmet.add(new StoreValues(0.092,Enchantment.PROTECTION_EXPLOSIONS,1,10)); + chain_helmet.add(new StoreValues(0.072,Enchantment.PROTECTION_PROJECTILE,2,10)); + chain_helmet.add(new StoreValues(0.022,Enchantment.PROTECTION_FIRE,1,10)); + chain_helmet.add(new StoreValues(0.015,Enchantment.OXYGEN,1,10)); + chain_leggings.add(new StoreValues(0.523,Enchantment.PROTECTION_ENVIRONMENTAL,1,10)); + chain_leggings.add(new StoreValues(0.178,Enchantment.PROTECTION_PROJECTILE,1,10)); + chain_leggings.add(new StoreValues(0.101,Enchantment.PROTECTION_EXPLOSIONS,1,10)); + chain_leggings.add(new StoreValues(0.083,Enchantment.PROTECTION_PROJECTILE,2,10)); + chain_leggings.add(new StoreValues(0.025,Enchantment.PROTECTION_FIRE,1,10)); + chain_chestplate.add(new StoreValues(0.525,Enchantment.PROTECTION_ENVIRONMENTAL,1,10)); + chain_chestplate.add(new StoreValues(0.172,Enchantment.PROTECTION_PROJECTILE,1,10)); + chain_chestplate.add(new StoreValues(0.10,Enchantment.PROTECTION_EXPLOSIONS,1,10)); + chain_chestplate.add(new StoreValues(0.083,Enchantment.PROTECTION_PROJECTILE,2,10)); + chain_chestplate.add(new StoreValues(0.025,Enchantment.PROTECTION_FIRE,1,10)); + chain_chestplate.add(new StoreValues(0.019,Enchantment.THORNS,1,10)); + } } diff --git a/BankEconomyMod/src/me/kaZep/Base/Main.java b/BankEconomyMod/src/me/kaZep/Base/Main.java index 1f2cff8..9cb7ee9 100644 --- a/BankEconomyMod/src/me/kaZep/Base/Main.java +++ b/BankEconomyMod/src/me/kaZep/Base/Main.java @@ -194,7 +194,7 @@ public class Main extends JavaPlugin public double Warning(double hp,int id) { if (hp>65) { - Bukkit.broadcastMessage("Main: HP too high for ID "+id+". HP was "+hp); + //Bukkit.broadcastMessage("Main: HP too high for ID "+id+". HP was "+hp); } return hp; } @@ -2883,6 +2883,7 @@ public void checkJukeboxes() { } } } + /* Kind of an out-of-date way to spawn things. Don't need anymore. //Find out how much a player is worth. if (list[i].getWorld().getName().compareTo("world")==0 && list[i].getLocation().getY()<=50) { double value=0; @@ -3021,7 +3022,7 @@ public void checkJukeboxes() { }break; } } - } + }*/ list[i].getScoreboard().getTeam(list[i].getName()).setSuffix(healthbar(list[i].getHealth(),list[i].getMaxHealth(),list[i].getFoodLevel())); } LOGGING_UPDATE_COUNTS++; //3 @@ -3999,10 +4000,6 @@ public void payDay(int time) if (item.getType()==Material.IRON_AXE) {enchant_data=ENCHANTMENT_DATA.iron_axe;} else if (item.getType()==Material.GOLD_SPADE) {enchant_data=ENCHANTMENT_DATA.golden_shovel;} else if (item.getType()==Material.GOLD_AXE) {enchant_data=ENCHANTMENT_DATA.golden_axe;} else - if (item.getType()==Material.CHAINMAIL_HELMET) {enchant_data=ENCHANTMENT_DATA.chain_helmet;} else - if (item.getType()==Material.CHAINMAIL_CHESTPLATE) {enchant_data=ENCHANTMENT_DATA.chain_chestplate;} else - if (item.getType()==Material.CHAINMAIL_LEGGINGS) {enchant_data=ENCHANTMENT_DATA.chain_leggings;} else - if (item.getType()==Material.CHAINMAIL_BOOTS) {enchant_data=ENCHANTMENT_DATA.chain_boots;} else if (item.getType()==Material.IRON_LEGGINGS) {enchant_data=ENCHANTMENT_DATA.iron_leggings;} else if (item.getType()==Material.DIAMOND_SPADE) {enchant_data=ENCHANTMENT_DATA.diamond_shovel;} else if (item.getType()==Material.GOLD_BOOTS) {enchant_data=ENCHANTMENT_DATA.golden_boots;} else @@ -4016,6 +4013,10 @@ public void payDay(int time) if (item.getType()==Material.DIAMOND_HELMET) {enchant_data=ENCHANTMENT_DATA.diamond_helmet;} else if (item.getType()==Material.DIAMOND_LEGGINGS) {enchant_data=ENCHANTMENT_DATA.diamond_leggings;} else if (item.getType()==Material.DIAMOND_CHESTPLATE) {enchant_data=ENCHANTMENT_DATA.diamond_chestplate;} + if (item.getType()==Material.CHAINMAIL_HELMET) {enchant_data=ENCHANTMENT_DATA.chain_helmet;} else + if (item.getType()==Material.CHAINMAIL_CHESTPLATE) {enchant_data=ENCHANTMENT_DATA.chain_chestplate;} else + if (item.getType()==Material.CHAINMAIL_LEGGINGS) {enchant_data=ENCHANTMENT_DATA.chain_leggings;} else + if (item.getType()==Material.CHAINMAIL_BOOTS) {enchant_data=ENCHANTMENT_DATA.chain_boots;} int enchantments=0; int iterations=0; while (enchantments==0 && iterations<100) { //Attempt to enchant it, up to 100 tries. diff --git a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java index 78ec50d..76c0e0b 100644 --- a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java +++ b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java @@ -1852,7 +1852,7 @@ public class PlayerListener public double Warning(double hp,int id) { if (hp>65) { - Bukkit.broadcastMessage("PlayerListener: HP too high for ID "+id+". HP was "+hp); + //Bukkit.broadcastMessage("PlayerListener: HP too high for ID "+id+". HP was "+hp); } return hp; } @@ -2260,6 +2260,36 @@ public class PlayerListener if (spawners==0 && (Math.random()<=despawnchancer || (torches+glowstone>=3))) { allow=false; + } else { + allow=true; + } + + + int totallvs=0; + List nearbylist = e.getEntity().getNearbyEntities(30, 30, 30); + //Filter out all unrelated e.getEntity() types. + for (int k=0;kmaxgroup) { + allow=false; //Too many mobs, can't have more. } if (!allow) { @@ -2303,50 +2333,7 @@ public class PlayerListener } } - int totallvs=0; - List nearbylist = e.getEntity().getNearbyEntities(30, 30, 30); - //Filter out all unrelated e.getEntity() types. - for (int k=0;k10) { - while (k20*levelsmult) { if (totallvs<40*levelsmult) { //Sometimes wear leather armor. Only for Skeletons and Zombies. @@ -6478,6 +6465,7 @@ public ItemStack getGoodie() { final public void FatalSurvivor(Player p) { p.setHealth(p.getMaxHealth()); + p.setNoDamageTicks(100); p.sendMessage("You used your "+ChatColor.YELLOW+"Lv10 Fatal Survivor"+ChatColor.WHITE+" buff. Your health has been restored."+ChatColor.AQUA+" It will be recharged in one hour."); Bukkit.broadcastMessage(ChatColor.YELLOW+p.getName()+ChatColor.WHITE+" has died...and revived through sheer willpower!"); p.setFireTicks(0); @@ -6859,9 +6847,9 @@ public ItemStack getGoodie() { } } ////Bukkit.getLogger().info("Made it through 1."); - if (e.getDamager().getType()==EntityType.CREEPER) { + /*if (e.getDamager().getType()==EntityType.CREEPER) { e.setDamage(e.getDamage()/2.0d); - } + }*/ if (e.getEntity().getType()==EntityType.PLAYER) { final Player p = (Player)e.getEntity(); List nearby = p.getNearbyEntities(10, 10, 10);