Updates to allow for configuration of items found while fishing.

This commit is contained in:
Grant 2012-01-30 02:12:12 -05:00
parent 5b45ea3739
commit d1ce5f0be5
2 changed files with 637 additions and 155 deletions

View File

@ -28,7 +28,8 @@ public class LoadProperties
whoisEnable, statsEnable, addxpEnable, ptpEnable, mmoeditEnable, clearmyspawnEnable, mcgodEnable, mcabilityEnable, mctopEnable,
mcrefreshEnable, enableMotd, enableMySpawn, enableRegen, enableCobbleToMossy, useMySQL, cocoabeans, mushrooms,
toolsLoseDurabilityFromAbilities, pvpxp, miningrequirespickaxe, excavationRequiresShovel, woodcuttingrequiresaxe, eggs, apples, cake, music, diamond, glowstone,
slowsand, sulphur, netherrack, bones, coal, clay, anvilmessages, mayDowngradeEnchants, mayLoseEnchants;
slowsand, sulphur, netherrack, bones, coal, clay, anvilmessages, mayDowngradeEnchants, mayLoseEnchants,
fishingDrops, leatherArmor, ironArmor, goldArmor, diamondArmor, woodenTools, stoneTools, ironTools, goldTools, diamondTools, enderPearl, blazeRod, records, glowstoneDust, fishingDiamonds;
public static String xplock, MySQLtablePrefix, MySQLuserName, MySQLserverName, MySQLdbName, MySQLdbPass, mctop, addxp,
xprate, mcability, mcmmo, mcc, mcrefresh, mcgod, stats, mmoedit, ptp, party, myspawn, whois, invite, accept, clearmyspawn, nWood,
@ -41,7 +42,8 @@ public class LoadProperties
xpGainMultiplier, superBreakerCooldown, greenTerraCooldown, gigaDrillBreakerCooldown, treeFellerCooldown,
berserkCooldown, serratedStrikeCooldown, skullSplitterCooldown, abilityDurabilityLoss,
feathersConsumedByChimaeraWing, bonesConsumedByCOTW, repairdiamondlevel, rWood, rStone, rIron, rGold, rDiamond, rString, rLeather,
downgradeRank1, downgradeRank2, downgradeRank3, downgradeRank4, keepEnchantsRank1, keepEnchantsRank2, keepEnchantsRank3, keepEnchantsRank4;
downgradeRank1, downgradeRank2, downgradeRank3, downgradeRank4, keepEnchantsRank1, keepEnchantsRank2, keepEnchantsRank3, keepEnchantsRank4,
fishingDropChanceTier1, fishingDropChanceTier2, fishingDropChanceTier3, fishingDropChanceTier4, fishingDropChanceTier5;
public static double xpbackground_r, xpbackground_g, xpbackground_b, xpborder_r, xpborder_g, xpborder_b, fishing_r, fishing_g, fishing_b, acrobatics_r, acrobatics_g, acrobatics_b, archery_r, archery_g, archery_b, axes_r, axes_g, axes_b,
excavation_r, excavation_g, excavation_b, herbalism_r, herbalism_g, herbalism_b, mining_r, mining_g, mining_b,
@ -353,6 +355,7 @@ public class LoadProperties
write("Skills.Woodcutting.Requires_Axe", true);
write("Skills.Taming.Call_Of_The_Wild.Bones_Required", 10);
//Arcane Forging Config Options
write("Arcane_Forging.Downgrades.Enabled", true);
write("Arcane_Forging.Downgrades.Chance.Rank_1", 75);
write("Arcane_Forging.Downgrades.Chance.Rank_2", 50);
@ -363,6 +366,29 @@ public class LoadProperties
write("Arcane_Forging.Keep_Enchants.Chance.Rank_2", 20);
write("Arcane_Forging.Keep_Enchants.Chance.Rank_3", 30);
write("Arcane_Forging.Keep_Enchants.Chance.Rank_4", 40);
//Fishing Config Options
write("Fishing.Drops.Item_Drops_Enabled", true);
write("Fishing.Drops.Drop_Chance.Tier_1", 20);
write("Fishing.Drops.Drop_Chance.Tier_2", 25);
write("Fishing.Drops.Drop_Chance.Tier_3", 30);
write("Fishing.Drops.Drop_Chance.Tier_4", 35);
write("Fishing.Drops.Drop_Chance.Tier_5", 40);
write("Fishing.Drops.Leather_Armor", true);
write("Fishing.Drops.Iron_Armor", true);
write("Fishing.Drops.Gold_Armor", true);
write("Fishing.Drops.Diamond_Armor", true);
write("Fishing.Drops.Wooden_Tools", true);
write("Fishing.Drops.Stone_Tools", true);
write("Fishing.Drops.Iron_Tools", true);
write("Fishing.Drops.Gold_Tools", true);
write("Fishing.Drops.Diamond_Tools", true);
write("Fishing.Drops.Ender_Pearl", true);
write("Fishing.Drops.Blaze_Rod", true);
write("Fishing.Drops.Records", true);
write("Fishing.Drops.Glowstone_Dust", true);
write("Fishing.Drops.Diamonds", true);
loadkeys();
}
private void loadkeys()
@ -590,6 +616,27 @@ public class LoadProperties
bucket = readBoolean("Excavation.Drops.Bucket", true);
web = readBoolean("Excavation.Drops.Web", true);
fishingDrops = readBoolean("Fishing.Drops.Item_Drops_Enabled", true);
fishingDropChanceTier1 = readInteger("Fishing.Drops.Drop_Chance.Tier_1", 20);
fishingDropChanceTier2 = readInteger("Fishing.Drops.Drop_Chance.Tier_2", 25);
fishingDropChanceTier3 = readInteger("Fishing.Drops.Drop_Chance.Tier_3", 30);
fishingDropChanceTier4 = readInteger("Fishing.Drops.Drop_Chance.Tier_4", 35);
fishingDropChanceTier5 = readInteger("Fishing.Drops.Drop_Chance.Tier_5", 40);
leatherArmor = readBoolean("Fishing.Drops.Leather_Armor", true);
ironArmor = readBoolean("Fishing.Drops.Iron_Armor", true);
goldArmor = readBoolean("Fishing.Drops.Gold_Armor", true);
diamondArmor = readBoolean("Fishing.Drops.Diamond_Armor", true);
woodenTools = readBoolean("Fishing.Drops.Wooden_Tools", true);
stoneTools = readBoolean("Fishing.Drops.Stone_Tools", true);
ironTools = readBoolean("Fishing.Drops.Iron_Tools", true);
goldTools = readBoolean("Fishing.Drops.Gold_Tools", true);
diamondTools = readBoolean("Fishing.Drops.Diamond_Tools", true);
enderPearl = readBoolean("Fishing.Drops.Ender_Pearl", true);
blazeRod = readBoolean("Fishing.Drops.Blaze_Rod", true);
records = readBoolean("Fishing.Drops.Records", true);
glowstoneDust = readBoolean("Fishing.Drops.Glowstone_Dust", true);
fishingDiamonds = readBoolean("Fishing.Drops.Diamonds", true);
xprate = readString("Commands.xprate.Name", "xprate");
xprateEnable = readBoolean("Commands.xprate.Enabled", true);

View File

@ -72,51 +72,93 @@ public class Fishing {
int randomNum = (int)(Math.random() * 15);
CraftItem theCatch = (CraftItem)event.getCaught();
if(Math.random() * 100 < 20)
if(Math.random() * 100 < LoadProperties.fishingDropChanceTier1)
{
switch(randomNum)
{
case 1:
if(LoadProperties.leatherArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.LEATHER_BOOTS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 2:
if(LoadProperties.leatherArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.LEATHER_HELMET, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 3:
if(LoadProperties.leatherArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.LEATHER_LEGGINGS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 4:
if(LoadProperties.leatherArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.LEATHER_CHESTPLATE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 5:
if(LoadProperties.woodenTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.WOOD_AXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 6:
if(LoadProperties.woodenTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.WOOD_PICKAXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 7:
if(LoadProperties.woodenTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.WOOD_SWORD, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 8:
if(LoadProperties.woodenTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.WOOD_HOE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 9:
if(LoadProperties.woodenTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.WOOD_SPADE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 10:
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.STONE_AXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 11:
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.STONE_PICKAXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 12:
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.STONE_SWORD, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 13:
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.STONE_HOE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 14:
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.STONE_SPADE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
}
} else
@ -133,66 +175,123 @@ public class Fishing {
int randomNum = (int)(Math.random() * 20);
CraftItem theCatch = (CraftItem)event.getCaught();
if(Math.random() * 100 < 25)
if(Math.random() * 100 < LoadProperties.fishingDropChanceTier2)
{
switch(randomNum)
{
case 1:
if(LoadProperties.leatherArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.LEATHER_BOOTS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 2:
if(LoadProperties.leatherArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.LEATHER_HELMET, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 3:
if(LoadProperties.leatherArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.LEATHER_LEGGINGS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 4:
if(LoadProperties.leatherArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.LEATHER_CHESTPLATE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 5:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 6:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 7:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 8:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 9:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 10:
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.STONE_AXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 11:
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.STONE_PICKAXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 12:
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.STONE_SWORD, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 13:
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.STONE_HOE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 14:
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.STONE_SPADE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 15:
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 16:
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 17:
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 18:
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 19:
if(LoadProperties.enderPearl && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
}
} else
@ -209,78 +308,147 @@ public class Fishing {
int randomNum = (int)(Math.random() * 24);
CraftItem theCatch = (CraftItem)event.getCaught();
if(Math.random() * 100 < 30)
if(Math.random() * 100 < LoadProperties.fishingDropChanceTier3)
{
switch(randomNum)
{
case 1:
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_BOOTS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 2:
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_HELMET, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 3:
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_LEGGINGS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 4:
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_CHESTPLATE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 5:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 6:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 7:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 8:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 9:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 10:
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_AXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 11:
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_PICKAXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 12:
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_SWORD, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 13:
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_HOE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 14:
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_SPADE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 15:
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 16:
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 17:
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 18:
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 19:
if(LoadProperties.enderPearl && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 20:
if(LoadProperties.blazeRod && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.BLAZE_ROD, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 21:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_3, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 22:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_4, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 23:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_5, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
}
}
@ -297,129 +465,249 @@ public class Fishing {
int randomNum = (int)(Math.random() * 41);
CraftItem theCatch = (CraftItem)event.getCaught();
if(Math.random() * 100 < 35)
if(Math.random() * 100 < LoadProperties.fishingDropChanceTier4)
{
switch(randomNum)
{
case 1:
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_BOOTS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 2:
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_HELMET, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 3:
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_LEGGINGS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 4:
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_CHESTPLATE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 5:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 6:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 7:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 8:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 9:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 10:
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_AXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 11:
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_PICKAXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 12:
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_SWORD, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 13:
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_HOE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 14:
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_SPADE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 15:
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 16:
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 17:
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 18:
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 19:
if(LoadProperties.enderPearl && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 20:
if(LoadProperties.blazeRod && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.BLAZE_ROD, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 21:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_3, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 22:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_4, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 23:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_5, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 24:
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_BOOTS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 25:
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HELMET, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 26:
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_LEGGINGS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 27:
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_CHESTPLATE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 28:
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_AXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 29:
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_PICKAXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 30:
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SWORD, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 31:
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HOE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 32:
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SPADE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 33:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_6, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 34:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_7, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 35:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_8, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 36:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_9, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 37:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_10, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 38:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_11, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 39:
if(LoadProperties.glowstoneDust && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GLOWSTONE_DUST, 16));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 40:
if(LoadProperties.fishingDiamonds && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND, (int)(Math.random() * 10)));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
}
} else
@ -435,156 +723,302 @@ public class Fishing {
int randomNum = (int)(Math.random() * 50);
CraftItem theCatch = (CraftItem)event.getCaught();
if(Math.random() * 100 < 40)
if(Math.random() * 100 < LoadProperties.fishingDropChanceTier5)
{
switch(randomNum)
{
case 1:
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_BOOTS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 2:
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_HELMET, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 3:
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_LEGGINGS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 4:
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_CHESTPLATE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 5:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 6:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 7:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 8:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 9:
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 10:
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_AXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 11:
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_PICKAXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 12:
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_SWORD, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 13:
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_HOE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 14:
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GOLD_SPADE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 15:
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 16:
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 17:
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 18:
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 19:
if(LoadProperties.enderPearl && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 20:
if(LoadProperties.blazeRod && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.BLAZE_ROD, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 21:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_3, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 22:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_4, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 23:
theCatch.setItemStack(new ItemStack(Material.RECORD_5, 1));
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_5, 1));else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 24:
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_BOOTS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 25:
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HELMET, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 26:
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_LEGGINGS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 27:
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_CHESTPLATE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 28:
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_AXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 29:
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_PICKAXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 30:
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SWORD, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 31:
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HOE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 32:
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SPADE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 33:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_6, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 34:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_7, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 35:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_8, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 36:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_9, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 37:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_10, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 38:
if(LoadProperties.records && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.RECORD_11, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 39:
if(LoadProperties.glowstoneDust && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.GLOWSTONE_DUST, 16));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 40:
if(LoadProperties.fishingDiamonds && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND, (int)(Math.random() * 20)));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 41:
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_BOOTS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 42:
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HELMET, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 43:
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_LEGGINGS, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 44:
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_CHESTPLATE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 45:
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_AXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 46:
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_PICKAXE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 47:
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SWORD, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 48:
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HOE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
case 49:
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SPADE, 1));
else
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
break;
}
} else {
@ -724,6 +1158,7 @@ public class Fishing {
}
}
//need to implement new shearing method
else if(le instanceof MushroomCow)
{
if(Math.random() * 100 < 99){