From 647078778de5e0bf7f856190bcbd378cd1bdcedb Mon Sep 17 00:00:00 2001 From: NuclearW Date: Tue, 31 Jan 2012 01:06:09 -0500 Subject: [PATCH 1/2] Update gitignore Remove unused resources. --- .gitignore | 3 +- .../Leaderboards/ACROBATICS.mcmmo | 0 .../FlatFileStuff/Leaderboards/ALCHEMY.mcmmo | 0 .../FlatFileStuff/Leaderboards/ALL.mcmmo | 0 .../FlatFileStuff/Leaderboards/ARCHERY.mcmmo | 0 .../FlatFileStuff/Leaderboards/AXES.mcmmo | 0 .../Leaderboards/ENCHANTING.mcmmo | 0 .../Leaderboards/EXCAVATION.mcmmo | 0 .../FlatFileStuff/Leaderboards/FISHING.mcmmo | 0 .../Leaderboards/HERBALISM.mcmmo | 0 .../FlatFileStuff/Leaderboards/MINING.mcmmo | 0 .../FlatFileStuff/Leaderboards/REPAIR.mcmmo | 0 .../FlatFileStuff/Leaderboards/SWORDS.mcmmo | 0 .../FlatFileStuff/Leaderboards/TAMING.mcmmo | 0 .../FlatFileStuff/Leaderboards/UNARMED.mcmmo | 0 .../Leaderboards/WOODCUTTING.mcmmo | 0 .../resources/mcMMO/FlatFileStuff/mcmmo.users | 0 src/main/resources/mcMMO/VERSION | 1 - src/main/resources/mcMMO/config.yml | 305 ------------------ 19 files changed, 2 insertions(+), 307 deletions(-) delete mode 100644 src/main/resources/mcMMO/FlatFileStuff/Leaderboards/ACROBATICS.mcmmo delete mode 100644 src/main/resources/mcMMO/FlatFileStuff/Leaderboards/ALCHEMY.mcmmo delete mode 100644 src/main/resources/mcMMO/FlatFileStuff/Leaderboards/ALL.mcmmo delete mode 100644 src/main/resources/mcMMO/FlatFileStuff/Leaderboards/ARCHERY.mcmmo delete mode 100644 src/main/resources/mcMMO/FlatFileStuff/Leaderboards/AXES.mcmmo delete mode 100644 src/main/resources/mcMMO/FlatFileStuff/Leaderboards/ENCHANTING.mcmmo delete mode 100644 src/main/resources/mcMMO/FlatFileStuff/Leaderboards/EXCAVATION.mcmmo delete mode 100644 src/main/resources/mcMMO/FlatFileStuff/Leaderboards/FISHING.mcmmo delete mode 100644 src/main/resources/mcMMO/FlatFileStuff/Leaderboards/HERBALISM.mcmmo delete mode 100644 src/main/resources/mcMMO/FlatFileStuff/Leaderboards/MINING.mcmmo delete mode 100644 src/main/resources/mcMMO/FlatFileStuff/Leaderboards/REPAIR.mcmmo delete mode 100644 src/main/resources/mcMMO/FlatFileStuff/Leaderboards/SWORDS.mcmmo delete mode 100644 src/main/resources/mcMMO/FlatFileStuff/Leaderboards/TAMING.mcmmo delete mode 100644 src/main/resources/mcMMO/FlatFileStuff/Leaderboards/UNARMED.mcmmo delete mode 100644 src/main/resources/mcMMO/FlatFileStuff/Leaderboards/WOODCUTTING.mcmmo delete mode 100644 src/main/resources/mcMMO/FlatFileStuff/mcmmo.users delete mode 100644 src/main/resources/mcMMO/VERSION delete mode 100644 src/main/resources/mcMMO/config.yml diff --git a/.gitignore b/.gitignore index 1340f75cf..bb3fe2f54 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ /.project /.classpath /target -/.settings \ No newline at end of file +/.settings +/src/main/resources/mcMMO \ No newline at end of file diff --git a/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/ACROBATICS.mcmmo b/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/ACROBATICS.mcmmo deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/ALCHEMY.mcmmo b/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/ALCHEMY.mcmmo deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/ALL.mcmmo b/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/ALL.mcmmo deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/ARCHERY.mcmmo b/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/ARCHERY.mcmmo deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/AXES.mcmmo b/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/AXES.mcmmo deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/ENCHANTING.mcmmo b/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/ENCHANTING.mcmmo deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/EXCAVATION.mcmmo b/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/EXCAVATION.mcmmo deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/FISHING.mcmmo b/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/FISHING.mcmmo deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/HERBALISM.mcmmo b/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/HERBALISM.mcmmo deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/MINING.mcmmo b/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/MINING.mcmmo deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/REPAIR.mcmmo b/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/REPAIR.mcmmo deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/SWORDS.mcmmo b/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/SWORDS.mcmmo deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/TAMING.mcmmo b/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/TAMING.mcmmo deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/UNARMED.mcmmo b/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/UNARMED.mcmmo deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/WOODCUTTING.mcmmo b/src/main/resources/mcMMO/FlatFileStuff/Leaderboards/WOODCUTTING.mcmmo deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/mcMMO/FlatFileStuff/mcmmo.users b/src/main/resources/mcMMO/FlatFileStuff/mcmmo.users deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/resources/mcMMO/VERSION b/src/main/resources/mcMMO/VERSION deleted file mode 100644 index d5a541918..000000000 --- a/src/main/resources/mcMMO/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.2.08 \ No newline at end of file diff --git a/src/main/resources/mcMMO/config.yml b/src/main/resources/mcMMO/config.yml deleted file mode 100644 index d07f9e113..000000000 --- a/src/main/resources/mcMMO/config.yml +++ /dev/null @@ -1,305 +0,0 @@ -Items: - Chimaera_Wing: - Enabled: true - Feather_Cost: 10 - Item_ID: 288 -Spout: - Menu: - Key: KEY_M - XP: - Bar: - Enabled: true - X_POS: 95 - Y_POS: 6 - Icon: - Enabled: true - X_POS: 78 - Y_POS: 2 - Party: - HUD: - Show_Faces: true - Enabled: true - Show_Display_Name: false - Images: - URL_DIR: http://mcmmo.rycochet.net/mcmmo/ - HUD: - Default: STANDARD - Retro: - Colors: - Swords: - BLUE: 0.75 - GREEN: 0.3 - RED: 0.3 - Taming: - BLUE: 0.75 - GREEN: 0.3 - RED: 0.3 - Acrobatics: - BLUE: 0.75 - GREEN: 0.3 - RED: 0.3 - Border: - BLUE: 0.0 - GREEN: 0.0 - RED: 0.0 - Background: - BLUE: 0.75 - GREEN: 0.75 - RED: 0.75 - Woodcutting: - BLUE: 0.75 - GREEN: 0.3 - RED: 0.3 - Archery: - BLUE: 0.75 - GREEN: 0.3 - RED: 0.3 - Axes: - BLUE: 0.75 - GREEN: 0.3 - RED: 0.3 - Repair: - BLUE: 0.75 - GREEN: 0.3 - RED: 0.3 - Fishing: - BLUE: 0.75 - GREEN: 0.3 - RED: 0.3 - Excavation: - BLUE: 0.75 - GREEN: 0.3 - RED: 0.3 - Herbalism: - BLUE: 0.75 - GREEN: 0.3 - RED: 0.3 - Unarmed: - BLUE: 0.75 - GREEN: 0.3 - RED: 0.3 - Mining: - BLUE: 0.75 - GREEN: 0.3 - RED: 0.3 -Skills: - Taming: - Call_Of_The_Wild: - Bones_Required: 10 - Excavation: - Requires_Shovel: true - Woodcutting: - Requires_Axe: true - Herbalism: - Green_Thumb: - Cobble_To_Mossy: true - Mining: - Requires_Pickaxe: true - Repair: - Leather: - ID: 334 - String: - Name: Leather - ID: 287 - Stone: - Name: Cobblestone - ID: 4 - Wood: - Name: Wood Planks - ID: 5 - Gold: - Name: Gold Bars - ID: 266 - Anvil_Messages: true - Diamond: - Name: Diamond - Level_Required: 50 - ID: 264 - Iron: - Name: Iron Bars - ID: 265 -Experience: - Fishing: - Base: 800 - Formula: - Multiplier: - Swords: 1.0 - Taming: 1.0 - Acrobatics: 1.0 - Sorcery: 1.0 - Excavation: 1.0 - Herbalism: 1.0 - Unarmed: 1.0 - Woodcutting: 1.0 - Mining: 1.0 - Archery: 1.0 - Axes: 1.0 - Repair: 1.0 - Gains: - Mobspawners: - Enabled: false - Multiplier: - PVP: 1 - Global: 1.0 - PVP: - Rewards: true - Excavation: - Base: 40 - Cake: 3000 - Sulphur: 30 - Bones: 30 - Map: 200 - Slimeballs: 100 - Bucket: 100 - Apple: 100 - Mushroom: 80 - Eggs: 100 - Slowsand: 80 - Watch: 200 - Web: 150 - String: 200 - Glowstone: 80 - Music: 3000 - Diamond: 1000 - Cocoa_Beans: 100 - Woodcutting: - Birch: 70 - Spruce: 80 - Pine: 90 - Herbalism: - Sugar_Cane: 30 - Cactus: 30 - Flowers: 100 - Pumpkin: 550 - Mushrooms: 150 - Wheat: 50 - Melon: 40 - Mining: - Sandstone: 30 - Glowstone: 30 - Obsidian: 150 - Stone: 30 - Netherrack: 30 - Gold: 350 - Redstone: 150 - Coal: 100 - Diamond: 750 - lapis: 400 - Iron: 250 -MySQL: - Enabled: false - Database: - User: - Name: UserName - Password: UserPassword - Name: DataBaseName - TablePrefix: mcmmo_ - Server: - Port: 3306 - Address: localhost -XP: - Gains: - Mobspawners: - Enabled: false - PVP: - Rewards: true -General: - HP_Regeneration: - Enabled: true - Locale: en_us - MySpawn: - Enabled: true - MOTD: - Enabled: true -Excavation: - Drops: - Cake: true - Sulphur: true - Bones: true - Apples: true - Map: true - Slimeballs: true - Bucket: true - Netherrack: true - Mushrooms: true - Eggs: true - Slowsand: true - Watch: true - Web: true - String: true - Glowstone: true - Music: true - Diamond: true - Cocoa_Beans: true -Abilities: - Activation: - Only_Activate_When_Sneaking: false - Enabled: true - Messages: true - Cooldowns: - Giga_Drill_Breaker: 240 - Berserk: 240 - Green_Terra: 240 - Skull_Splitter: 240 - Serrated_Strikes: 240 - Tree_Feller: 240 - Super_Breaker: 240 - Tools: - Durability_Loss: 2 - Durability_Loss_Enabled: true -Commands: - invite: - Name: invite - Enabled: true - mctop: - Name: mctop - Enabled: true - xplock: - Name: xplock - Enabled: true - whois: - Name: whois - Enabled: true - mcc: - Name: mcc - Enabled: true - mmoedit: - Name: mmoedit - Enabled: true - accept: - Name: accept - Enabled: true - stats: - Name: stats - Enabled: true - mcability: - Name: mcability - Enabled: true - party: - Name: party - Enabled: true - xprate: - Name: xprate - Enabled: true - mcgod: - Name: mcgod - Enabled: true - mcmmo: - Name: mcmmo - Enabled: true - Donate_Message: true - mcrefresh: - Name: mcrefresh - Enabled: true - myspawn: - Name: myspawn - Enabled: true - addxp: - Name: addxp - Enabled: true - clearmyspawn: - Name: clearmyspawn - Enabled: true - ptp: - Name: ptp - Enabled: true From 7cefdedea245b40617fd42742429650a974e96e5 Mon Sep 17 00:00:00 2001 From: NuclearW Date: Tue, 31 Jan 2012 01:25:17 -0500 Subject: [PATCH 2/2] Added Nether Wart, Lily Pads, and Vines to Herbalism Cherry picked from pull #62 --- .../gmail/nossr50/config/LoadProperties.java | 25 ++++++++-- .../com/gmail/nossr50/skills/Herbalism.java | 48 +++++++++++++++++-- 2 files changed, 66 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/config/LoadProperties.java b/src/main/java/com/gmail/nossr50/config/LoadProperties.java index 81af2af70..6ca35b02b 100644 --- a/src/main/java/com/gmail/nossr50/config/LoadProperties.java +++ b/src/main/java/com/gmail/nossr50/config/LoadProperties.java @@ -46,7 +46,8 @@ public class LoadProperties berserkCooldown, serratedStrikeCooldown, skullSplitterCooldown, abilityDurabilityLoss, feathersConsumedByChimaeraWing, bonesConsumedByCOTW, repairdiamondlevel, rWood, rStone, rIron, rGold, rDiamond, rString, rLeather, downgradeRank1, downgradeRank2, downgradeRank3, downgradeRank4, keepEnchantsRank1, keepEnchantsRank2, keepEnchantsRank3, keepEnchantsRank4, - fishingDropChanceTier1, fishingDropChanceTier2, fishingDropChanceTier3, fishingDropChanceTier4, fishingDropChanceTier5; + fishingDropChanceTier1, fishingDropChanceTier2, fishingDropChanceTier3, fishingDropChanceTier4, fishingDropChanceTier5, + mnetherwart, mvines, mlilypad; 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, @@ -237,6 +238,8 @@ public class LoadProperties write("Experience.Formula.Multiplier.Axes", 1.0); write("Experience.Formula.Multiplier.Sorcery", 1.0); write("Experience.Formula.Multiplier.Acrobatics", 1.0); + + //Mining XP values write("Experience.Mining.Gold", 350); write("Experience.Mining.Diamond", 750); write("Experience.Mining.Iron", 250); @@ -248,16 +251,25 @@ public class LoadProperties write("Experience.Mining.Coal", 100); write("Experience.Mining.Stone", 30); write("Experience.Mining.Sandstone", 30); + + //Herbalism XP values write("Experience.Herbalism.Sugar_Cane", 30); write("Experience.Herbalism.Cactus", 30); - write("Experience.Herbalism.Pumpkin", 550); + write("Experience.Herbalism.Pumpkin", 20); write("Experience.Herbalism.Flowers", 100); write("Experience.Herbalism.Wheat", 50); write("Experience.Herbalism.Mushrooms", 150); - write("Experience.Herbalism.Melon", 40); + write("Experience.Herbalism.Melon", 20); + write("Experience.Herbalism.Nether_Wart", 50); + write("Experience.Herbalism.Lily_Pads", 100); + write("Experience.Herbalism.Vines", 10); + + //Woodcutting XP values write("Experience.Woodcutting.Pine", 90); write("Experience.Woodcutting.Birch", 70); write("Experience.Woodcutting.Spruce", 80); + + //Excavation XP values write("Experience.Excavation.Base", 40); write("Experience.Excavation.Mushroom", 80); write("Experience.Excavation.Sulphur", 30); @@ -275,6 +287,8 @@ public class LoadProperties write("Experience.Excavation.String", 200); write("Experience.Excavation.Bucket", 100); write("Experience.Excavation.Web", 150); + + //Fishing XP values write("Experience.Fishing.Base", 800); //write("Sorcery.Spells.Water.Thunder", 75); @@ -509,10 +523,13 @@ public class LoadProperties msugar = readInteger("Experience.Herbalism.Sugar_Cane", 30); mwheat = readInteger("Experience.Herbalism.Wheat", 50); mcactus = readInteger("Experience.Herbalism.Cactus", 30); - mpumpkin = readInteger("Experience.Herbalism.Pumpkin", 550); + mpumpkin = readInteger("Experience.Herbalism.Pumpkin", 20); mflower = readInteger("Experience.Herbalism.Flowers", 100); mmushroom = readInteger("Experience.Herbalism.Mushrooms", 150); mmelon = readInteger("Experience.Herbalism.Melon", 20); + mnetherwart = readInteger("Experience.Herbalism.Nether_Wart", 50); + mlilypad = readInteger("Experience.Herbalism.Lily_Pads", 100); + mvines = readInteger("Experience.Herbalism.Vines", 10); mpine = readInteger("Experience.Woodcutting.Pine", 70); mbirch = readInteger("Experience.Woodcutting.Birch", 80); diff --git a/src/main/java/com/gmail/nossr50/skills/Herbalism.java b/src/main/java/com/gmail/nossr50/skills/Herbalism.java index 1e2196771..60eb33063 100644 --- a/src/main/java/com/gmail/nossr50/skills/Herbalism.java +++ b/src/main/java/com/gmail/nossr50/skills/Herbalism.java @@ -157,6 +157,8 @@ public class Herbalism { return; } + + //Wheat if(type == 59 && block.getData() == (byte) 0x7) { mat = Material.getMaterial(296); @@ -199,8 +201,24 @@ public class Herbalism block.setData((byte) 0x4); } } + + //Nether Wart + if(type == 115 && block.getData() == (byte) 0x3) + { + mat = Material.getMaterial(372); + is = new ItemStack(mat, 1, (byte)0, (byte)0); + PP.addXP(SkillType.HERBALISM, LoadProperties.mnetherwart, player); + if(player != null) + { + if(Math.random() * 1000 <= PP.getSkillLevel(SkillType.HERBALISM)) + { + m.mcDropItem(loc, is); + } + } + } + /* - * We need to check not-wheat stuff for if it was placed by the player or not + * We need to check not-wheat and not-netherwart stuff for if it was placed by the player or not */ if(block.getData() != (byte) 5) { @@ -298,8 +316,9 @@ public class Herbalism //Melon if(type == 103) { - mat = Material.getMaterial(block.getTypeId()); - is = new ItemStack(mat, 1, (byte)0, (byte)0); + mat = Material.getMaterial(360); + int slices = (int) ((Math.random() + 3) + (int)(Math.random() * 4)); //drop 3-7 melon slices rather than melon blocks + is = new ItemStack(mat, slices, (byte)0, (byte)0); if(Math.random() * 1000 <= PP.getSkillLevel(SkillType.HERBALISM)) { @@ -332,6 +351,29 @@ public class Herbalism } PP.addXP(SkillType.HERBALISM, LoadProperties.mflower, player); } + //Lily Pads + if(type == 111) + { + mat = Material.getMaterial(block.getTypeId()); + is = new ItemStack(mat, 1, (byte)0, (byte)0); + if(player != null){ + if(Math.random() * 1000 <= PP.getSkillLevel(SkillType.HERBALISM)){ + m.mcDropItem(loc, is); + } + } + PP.addXP(SkillType.HERBALISM, LoadProperties.mlilypad, player); + } + //Vines + if(type == 106){ + mat = Material.getMaterial(block.getTypeId()); + is = new ItemStack(mat, 1, (byte)0, (byte)0); + if(player != null){ + if(Math.random() * 1000 <= PP.getSkillLevel(SkillType.HERBALISM)){ + m.mcDropItem(loc, is); + } + } + PP.addXP(SkillType.HERBALISM, LoadProperties.mvines, player); + } } Skills.XpCheckSkill(SkillType.HERBALISM, player); }