From 42ddf648b1151231ebfd96698f05dc55ccfea015 Mon Sep 17 00:00:00 2001 From: gmcferrin Date: Sat, 28 Jan 2012 12:44:49 -0500 Subject: [PATCH 1/5] Possible fix for [Issue #53] --- src/main/java/com/gmail/nossr50/skills/Repair.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/skills/Repair.java b/src/main/java/com/gmail/nossr50/skills/Repair.java index acd026bab..cffbddb27 100644 --- a/src/main/java/com/gmail/nossr50/skills/Repair.java +++ b/src/main/java/com/gmail/nossr50/skills/Repair.java @@ -192,7 +192,7 @@ public class Repair { removeItem(player, rIron); repairItem(player, enchants, enchantsLevel); - durabilityAfter = (short) (player.getItemInHand().getDurability()-getRepairAmount(is, player)); + durabilityAfter = (short) (player.getItemInHand().getDurability(); dif = (short) (durabilityBefore - durabilityAfter); if(m.isShovel(is)) dif = (short) (dif / 3); From c8869c86bec01a2c03895bf1b472287e44663a12 Mon Sep 17 00:00:00 2001 From: gmcferrin Date: Sat, 28 Jan 2012 19:41:39 -0500 Subject: [PATCH 2/5] Fix typo. --- src/main/java/com/gmail/nossr50/skills/Repair.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/skills/Repair.java b/src/main/java/com/gmail/nossr50/skills/Repair.java index cffbddb27..dbb9c067f 100644 --- a/src/main/java/com/gmail/nossr50/skills/Repair.java +++ b/src/main/java/com/gmail/nossr50/skills/Repair.java @@ -192,7 +192,7 @@ public class Repair { removeItem(player, rIron); repairItem(player, enchants, enchantsLevel); - durabilityAfter = (short) (player.getItemInHand().getDurability(); + durabilityAfter = player.getItemInHand().getDurability(); dif = (short) (durabilityBefore - durabilityAfter); if(m.isShovel(is)) dif = (short) (dif / 3); From d1ce5f0be5ba368dbc03607a94472cbd8bcfd2bd Mon Sep 17 00:00:00 2001 From: Grant Date: Mon, 30 Jan 2012 02:12:12 -0500 Subject: [PATCH 3/5] Updates to allow for configuration of items found while fishing. --- .../gmail/nossr50/config/LoadProperties.java | 57 +- .../com/gmail/nossr50/skills/Fishing.java | 735 ++++++++++++++---- 2 files changed, 637 insertions(+), 155 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/config/LoadProperties.java b/src/main/java/com/gmail/nossr50/config/LoadProperties.java index 2fd6b1a43..3f3194928 100644 --- a/src/main/java/com/gmail/nossr50/config/LoadProperties.java +++ b/src/main/java/com/gmail/nossr50/config/LoadProperties.java @@ -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, @@ -343,7 +345,7 @@ public class LoadProperties write("Skills.Repair.Diamond.Level_Required", 50); write("Skills.Repair.Iron.ID", 265); write("Skills.Repair.Iron.Name", "Iron Bars"); - write("Skills.Repair.String.ID", 287); + write("Skills.Repair.String.ID", 287); write("Skills.Repair.String.Name", "String"); write("Skills.Repair.Leather.ID", 334); write("Skills.Repair.String.Name", "Leather"); @@ -353,7 +355,8 @@ public class LoadProperties write("Skills.Woodcutting.Requires_Axe", true); write("Skills.Taming.Call_Of_The_Wild.Bones_Required", 10); - write("Arcane_Forging.Downgrades.Enabled", true); + //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); write("Arcane_Forging.Downgrades.Chance.Rank_3", 25); @@ -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() @@ -561,7 +587,7 @@ public class LoadProperties rLeather = readInteger("Skills.Repair.Leather.ID", 334); nLeather = readString("Skills.Repair.String.Name", "Leather"); - mayDowngradeEnchants = readBoolean("Arcane_Forging.Downgrades.Enabled", true); + mayDowngradeEnchants = readBoolean("Arcane_Forging.Downgrades.Enabled", true); downgradeRank1 = readInteger("Arcane_Forging.Downgrades.Chance.Rank_1", 75); downgradeRank2 = readInteger("Arcane_Forging.Downgrades.Chance.Rank_2", 50); downgradeRank3 = readInteger("Arcane_Forging.Downgrades.Chance.Rank_3", 25); @@ -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); diff --git a/src/main/java/com/gmail/nossr50/skills/Fishing.java b/src/main/java/com/gmail/nossr50/skills/Fishing.java index 72197672c..964ca95be 100644 --- a/src/main/java/com/gmail/nossr50/skills/Fishing.java +++ b/src/main/java/com/gmail/nossr50/skills/Fishing.java @@ -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: - theCatch.setItemStack(new ItemStack(Material.LEATHER_BOOTS, 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: - theCatch.setItemStack(new ItemStack(Material.LEATHER_HELMET, 1)); + if(LoadProperties.leatherArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.LEATHER_HELMET, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 3: - theCatch.setItemStack(new ItemStack(Material.LEATHER_LEGGINGS, 1)); + if(LoadProperties.leatherArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.LEATHER_LEGGINGS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 4: - theCatch.setItemStack(new ItemStack(Material.LEATHER_CHESTPLATE, 1)); + if(LoadProperties.leatherArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.LEATHER_CHESTPLATE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 5: - theCatch.setItemStack(new ItemStack(Material.WOOD_AXE, 1)); + if(LoadProperties.woodenTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.WOOD_AXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 6: - theCatch.setItemStack(new ItemStack(Material.WOOD_PICKAXE, 1)); + if(LoadProperties.woodenTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.WOOD_PICKAXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 7: - theCatch.setItemStack(new ItemStack(Material.WOOD_SWORD, 1)); + if(LoadProperties.woodenTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.WOOD_SWORD, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 8: - theCatch.setItemStack(new ItemStack(Material.WOOD_HOE, 1)); + if(LoadProperties.woodenTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.WOOD_HOE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 9: - theCatch.setItemStack(new ItemStack(Material.WOOD_SPADE, 1)); + if(LoadProperties.woodenTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.WOOD_SPADE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 10: - theCatch.setItemStack(new ItemStack(Material.STONE_AXE, 1)); + if(LoadProperties.stoneTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.STONE_AXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 11: - theCatch.setItemStack(new ItemStack(Material.STONE_PICKAXE, 1)); + if(LoadProperties.stoneTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.STONE_PICKAXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 12: - theCatch.setItemStack(new ItemStack(Material.STONE_SWORD, 1)); + if(LoadProperties.stoneTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.STONE_SWORD, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 13: - theCatch.setItemStack(new ItemStack(Material.STONE_HOE, 1)); + if(LoadProperties.stoneTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.STONE_HOE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 14: - theCatch.setItemStack(new ItemStack(Material.STONE_SPADE, 1)); + 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: - theCatch.setItemStack(new ItemStack(Material.LEATHER_BOOTS, 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: - theCatch.setItemStack(new ItemStack(Material.LEATHER_HELMET, 1)); + if(LoadProperties.leatherArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.LEATHER_HELMET, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 3: - theCatch.setItemStack(new ItemStack(Material.LEATHER_LEGGINGS, 1)); + if(LoadProperties.leatherArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.LEATHER_LEGGINGS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 4: - theCatch.setItemStack(new ItemStack(Material.LEATHER_CHESTPLATE, 1)); + if(LoadProperties.leatherArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.LEATHER_CHESTPLATE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 5: - theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 6: - theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 7: - theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 8: - theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 9: - theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 10: - theCatch.setItemStack(new ItemStack(Material.STONE_AXE, 1)); + if(LoadProperties.stoneTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.STONE_AXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 11: - theCatch.setItemStack(new ItemStack(Material.STONE_PICKAXE, 1)); + if(LoadProperties.stoneTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.STONE_PICKAXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 12: - theCatch.setItemStack(new ItemStack(Material.STONE_SWORD, 1)); + if(LoadProperties.stoneTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.STONE_SWORD, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 13: - theCatch.setItemStack(new ItemStack(Material.STONE_HOE, 1)); + if(LoadProperties.stoneTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.STONE_HOE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 14: - theCatch.setItemStack(new ItemStack(Material.STONE_SPADE, 1)); + if(LoadProperties.stoneTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.STONE_SPADE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 15: - theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1)); + if(LoadProperties.ironArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 16: - theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1)); + if(LoadProperties.ironArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 17: - theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1)); + if(LoadProperties.ironArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 18: - theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1)); + if(LoadProperties.ironArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 19: - theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1)); + 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: - theCatch.setItemStack(new ItemStack(Material.GOLD_BOOTS, 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: - theCatch.setItemStack(new ItemStack(Material.GOLD_HELMET, 1)); + if(LoadProperties.goldArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_HELMET, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 3: - theCatch.setItemStack(new ItemStack(Material.GOLD_LEGGINGS, 1)); + if(LoadProperties.goldArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_LEGGINGS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 4: - theCatch.setItemStack(new ItemStack(Material.GOLD_CHESTPLATE, 1)); + if(LoadProperties.goldArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_CHESTPLATE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 5: - theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 6: - theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 7: - theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 8: - theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 9: - theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 10: - theCatch.setItemStack(new ItemStack(Material.GOLD_AXE, 1)); + if(LoadProperties.goldTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_AXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 11: - theCatch.setItemStack(new ItemStack(Material.GOLD_PICKAXE, 1)); + if(LoadProperties.goldTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_PICKAXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 12: - theCatch.setItemStack(new ItemStack(Material.GOLD_SWORD, 1)); + if(LoadProperties.goldTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_SWORD, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 13: - theCatch.setItemStack(new ItemStack(Material.GOLD_HOE, 1)); + if(LoadProperties.goldTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_HOE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 14: - theCatch.setItemStack(new ItemStack(Material.GOLD_SPADE, 1)); + if(LoadProperties.goldTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_SPADE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 15: - theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1)); + if(LoadProperties.ironArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 16: - theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1)); + if(LoadProperties.ironArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 17: - theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1)); + if(LoadProperties.ironArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 18: - theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1)); + if(LoadProperties.ironArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 19: - theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1)); + if(LoadProperties.enderPearl && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 20: - theCatch.setItemStack(new ItemStack(Material.BLAZE_ROD, 1)); + if(LoadProperties.blazeRod && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.BLAZE_ROD, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 21: - theCatch.setItemStack(new ItemStack(Material.RECORD_3, 1)); + if(LoadProperties.records && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.RECORD_3, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 22: - theCatch.setItemStack(new ItemStack(Material.RECORD_4, 1)); + 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; } } @@ -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: - theCatch.setItemStack(new ItemStack(Material.GOLD_BOOTS, 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: - theCatch.setItemStack(new ItemStack(Material.GOLD_HELMET, 1)); + if(LoadProperties.goldArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_HELMET, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 3: - theCatch.setItemStack(new ItemStack(Material.GOLD_LEGGINGS, 1)); + if(LoadProperties.goldArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_LEGGINGS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 4: - theCatch.setItemStack(new ItemStack(Material.GOLD_CHESTPLATE, 1)); + if(LoadProperties.goldArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_CHESTPLATE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 5: - theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 6: - theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 7: - theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 8: - theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 9: - theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 10: - theCatch.setItemStack(new ItemStack(Material.GOLD_AXE, 1)); + if(LoadProperties.goldTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_AXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 11: - theCatch.setItemStack(new ItemStack(Material.GOLD_PICKAXE, 1)); + if(LoadProperties.goldTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_PICKAXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 12: - theCatch.setItemStack(new ItemStack(Material.GOLD_SWORD, 1)); + if(LoadProperties.goldTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_SWORD, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 13: - theCatch.setItemStack(new ItemStack(Material.GOLD_HOE, 1)); + if(LoadProperties.goldTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_HOE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 14: - theCatch.setItemStack(new ItemStack(Material.GOLD_SPADE, 1)); + if(LoadProperties.goldTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_SPADE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 15: - theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1)); + if(LoadProperties.ironArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 16: - theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1)); + if(LoadProperties.ironArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 17: - theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1)); + if(LoadProperties.ironArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 18: - theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1)); + if(LoadProperties.ironArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 19: - theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1)); + if(LoadProperties.enderPearl && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 20: - theCatch.setItemStack(new ItemStack(Material.BLAZE_ROD, 1)); + if(LoadProperties.blazeRod && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.BLAZE_ROD, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 21: - theCatch.setItemStack(new ItemStack(Material.RECORD_3, 1)); + if(LoadProperties.records && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.RECORD_3, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 22: - theCatch.setItemStack(new ItemStack(Material.RECORD_4, 1)); + 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: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_BOOTS, 1)); + if(LoadProperties.diamondArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_BOOTS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 25: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_HELMET, 1)); + if(LoadProperties.diamondArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_HELMET, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 26: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_LEGGINGS, 1)); + if(LoadProperties.diamondArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_LEGGINGS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 27: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_CHESTPLATE, 1)); + if(LoadProperties.diamondArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_CHESTPLATE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 28: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_AXE, 1)); + if(LoadProperties.diamondTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_AXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 29: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_PICKAXE, 1)); + if(LoadProperties.diamondTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_PICKAXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 30: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_SWORD, 1)); + if(LoadProperties.diamondTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_SWORD, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 31: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_HOE, 1)); + if(LoadProperties.diamondTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_HOE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 32: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_SPADE, 1)); + if(LoadProperties.diamondTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_SPADE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 33: - theCatch.setItemStack(new ItemStack(Material.RECORD_6, 1)); + if(LoadProperties.records && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.RECORD_6, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 34: - theCatch.setItemStack(new ItemStack(Material.RECORD_7, 1)); + if(LoadProperties.records && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.RECORD_7, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 35: - theCatch.setItemStack(new ItemStack(Material.RECORD_8, 1)); + if(LoadProperties.records && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.RECORD_8, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 36: - theCatch.setItemStack(new ItemStack(Material.RECORD_9, 1)); + if(LoadProperties.records && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.RECORD_9, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 37: - theCatch.setItemStack(new ItemStack(Material.RECORD_10, 1)); + if(LoadProperties.records && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.RECORD_10, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 38: - theCatch.setItemStack(new ItemStack(Material.RECORD_11, 1)); + if(LoadProperties.records && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.RECORD_11, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 39: - theCatch.setItemStack(new ItemStack(Material.GLOWSTONE_DUST, 16)); + if(LoadProperties.glowstoneDust && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GLOWSTONE_DUST, 16)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 40: - theCatch.setItemStack(new ItemStack(Material.DIAMOND, (int)(Math.random() * 10))); + 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: - theCatch.setItemStack(new ItemStack(Material.GOLD_BOOTS, 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: - theCatch.setItemStack(new ItemStack(Material.GOLD_HELMET, 1)); + if(LoadProperties.goldArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_HELMET, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 3: - theCatch.setItemStack(new ItemStack(Material.GOLD_LEGGINGS, 1)); + if(LoadProperties.goldArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_LEGGINGS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 4: - theCatch.setItemStack(new ItemStack(Material.GOLD_CHESTPLATE, 1)); + if(LoadProperties.goldArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_CHESTPLATE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 5: - theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 6: - theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 7: - theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 8: - theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 9: - theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1)); + if(LoadProperties.ironTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 10: - theCatch.setItemStack(new ItemStack(Material.GOLD_AXE, 1)); + if(LoadProperties.goldTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_AXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 11: - theCatch.setItemStack(new ItemStack(Material.GOLD_PICKAXE, 1)); + if(LoadProperties.goldTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_PICKAXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 12: - theCatch.setItemStack(new ItemStack(Material.GOLD_SWORD, 1)); + if(LoadProperties.goldTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_SWORD, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 13: - theCatch.setItemStack(new ItemStack(Material.GOLD_HOE, 1)); + if(LoadProperties.goldTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_HOE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 14: - theCatch.setItemStack(new ItemStack(Material.GOLD_SPADE, 1)); + if(LoadProperties.goldTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GOLD_SPADE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 15: - theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1)); + if(LoadProperties.ironArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 16: - theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1)); + if(LoadProperties.ironArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 17: - theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1)); + if(LoadProperties.ironArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 18: - theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1)); + if(LoadProperties.ironArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 19: - theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1)); + if(LoadProperties.enderPearl && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 20: - theCatch.setItemStack(new ItemStack(Material.BLAZE_ROD, 1)); + if(LoadProperties.blazeRod && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.BLAZE_ROD, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 21: - theCatch.setItemStack(new ItemStack(Material.RECORD_3, 1)); + if(LoadProperties.records && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.RECORD_3, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 22: - theCatch.setItemStack(new ItemStack(Material.RECORD_4, 1)); + 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: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_BOOTS, 1)); + if(LoadProperties.diamondArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_BOOTS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 25: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_HELMET, 1)); + if(LoadProperties.diamondArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_HELMET, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 26: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_LEGGINGS, 1)); + if(LoadProperties.diamondArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_LEGGINGS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 27: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_CHESTPLATE, 1)); + if(LoadProperties.diamondArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_CHESTPLATE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 28: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_AXE, 1)); + if(LoadProperties.diamondTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_AXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 29: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_PICKAXE, 1)); + if(LoadProperties.diamondTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_PICKAXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 30: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_SWORD, 1)); + if(LoadProperties.diamondTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_SWORD, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 31: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_HOE, 1)); + if(LoadProperties.diamondTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_HOE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 32: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_SPADE, 1)); + if(LoadProperties.diamondTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_SPADE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 33: - theCatch.setItemStack(new ItemStack(Material.RECORD_6, 1)); + if(LoadProperties.records && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.RECORD_6, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 34: - theCatch.setItemStack(new ItemStack(Material.RECORD_7, 1)); + if(LoadProperties.records && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.RECORD_7, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 35: - theCatch.setItemStack(new ItemStack(Material.RECORD_8, 1)); + if(LoadProperties.records && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.RECORD_8, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 36: - theCatch.setItemStack(new ItemStack(Material.RECORD_9, 1)); + if(LoadProperties.records && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.RECORD_9, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 37: - theCatch.setItemStack(new ItemStack(Material.RECORD_10, 1)); + if(LoadProperties.records && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.RECORD_10, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 38: - theCatch.setItemStack(new ItemStack(Material.RECORD_11, 1)); + if(LoadProperties.records && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.RECORD_11, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 39: - theCatch.setItemStack(new ItemStack(Material.GLOWSTONE_DUST, 16)); + if(LoadProperties.glowstoneDust && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.GLOWSTONE_DUST, 16)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 40: - theCatch.setItemStack(new ItemStack(Material.DIAMOND, (int)(Math.random() * 20))); + 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: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_BOOTS, 1)); + if(LoadProperties.diamondArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_BOOTS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 42: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_HELMET, 1)); + if(LoadProperties.diamondArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_HELMET, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 43: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_LEGGINGS, 1)); + if(LoadProperties.diamondArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_LEGGINGS, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 44: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_CHESTPLATE, 1)); + if(LoadProperties.diamondArmor && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_CHESTPLATE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 45: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_AXE, 1)); + if(LoadProperties.diamondTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_AXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 46: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_PICKAXE, 1)); + if(LoadProperties.diamondTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_PICKAXE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 47: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_SWORD, 1)); + if(LoadProperties.diamondTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_SWORD, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 48: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_HOE, 1)); + if(LoadProperties.diamondTools && LoadProperties.fishingDrops) + theCatch.setItemStack(new ItemStack(Material.DIAMOND_HOE, 1)); + else + theCatch.setItemStack(new ItemStack(Material.RAW_FISH)); break; case 49: - theCatch.setItemStack(new ItemStack(Material.DIAMOND_SPADE, 1)); + 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){ From e69c2fd68e9cb3e42f231ab98f3cc55a672f1f36 Mon Sep 17 00:00:00 2001 From: Grant Date: Mon, 30 Jan 2012 07:54:19 -0500 Subject: [PATCH 4/5] Updated pom.xml with new RB & Bukkit API --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 7566c49ed..19268c2fc 100644 --- a/pom.xml +++ b/pom.xml @@ -107,14 +107,14 @@ org.bukkit bukkit - 1.1-R3-SNAPSHOT + bukkit-1.1-R4-20120130.090521-1 jar compile org.bukkit craftbukkit - 1.1-R2 + 1.1-R3 jar compile From 63d9b30d14b7dafdd0d61ccfdfcb040693fb5568 Mon Sep 17 00:00:00 2001 From: Grant Date: Mon, 30 Jan 2012 12:20:15 -0500 Subject: [PATCH 5/5] Reverted changes in prior commit to solve compatibility issue. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 19268c2fc..9438fa952 100644 --- a/pom.xml +++ b/pom.xml @@ -107,7 +107,7 @@ org.bukkit bukkit - bukkit-1.1-R4-20120130.090521-1 + 1.1-R4-SNAPSHOT jar compile