浏览代码

Tree Feller is faster. Added limit to tree feller.
Added Jungle Tree to Woodcutting XP Tables.
Renamed Pine to Oak. Modified default Woodcutting XP Tables.

nossr50 13 年之前
父节点
当前提交
6708947332

+ 4 - 0
Changelog.txt

@@ -10,11 +10,13 @@ Key:
 Version 1.3.00-dev
 Version 1.3.00-dev
  + Added ability to customize drops for Excavation skill
  + Added ability to customize drops for Excavation skill
  + Added ability to customize drops for Fishing skill
  + Added ability to customize drops for Fishing skill
+ + Added jungle trees to Woodcutting XP tables
  + Added player notification for when they stop Bleeding
  + Added player notification for when they stop Bleeding
  + Added configuration option to control mcMMO reporting damage events
  + Added configuration option to control mcMMO reporting damage events
  + Added hunger regain bonuses to Herbalism skill
  + Added hunger regain bonuses to Herbalism skill
  + Added Blast Mining subskills to Mining
  + Added Blast Mining subskills to Mining
  + Added Fast Food Service subskill to Taming
  + Added Fast Food Service subskill to Taming
+ + Added size limit to Tree Feller in config as Tree Feller Threshold
  + Re-added mcMMO reporting damage events
  + Re-added mcMMO reporting damage events
  = Fixed Leaf Blower preventing the use of shears to collect leaves
  = Fixed Leaf Blower preventing the use of shears to collect leaves
  = Fixed Green Thumb & Green Terra not consuming or requiring seeds to replant Wheat
  = Fixed Green Thumb & Green Terra not consuming or requiring seeds to replant Wheat
@@ -26,6 +28,8 @@ Version 1.3.00-dev
  = Prettied up new config files
  = Prettied up new config files
  = Various skill function optimizations
  = Various skill function optimizations
  ! Changed mcMMO user information to be stored for 2 minutes after log out to reduce lag on rejoins
  ! Changed mcMMO user information to be stored for 2 minutes after log out to reduce lag on rejoins
+ ! Changed default values of Woodcutting XP tables
+ ! Changed 'Pine' to be renamed 'Oak' in Woodcutting XP tables
  ! Changed the name of Unarmed Apprentice/Mastery to Iron Arm Style
  ! Changed the name of Unarmed Apprentice/Mastery to Iron Arm Style
  ! Changed Unarmed to start with a +3 DMG bonus from Iron Arm Style to make leveling it more viable
  ! Changed Unarmed to start with a +3 DMG bonus from Iron Arm Style to make leveling it more viable
  ! Changed Unarmed to gain bonus damage every 50 skill levels
  ! Changed Unarmed to gain bonus damage every 50 skill levels

+ 7 - 5
src/main/java/com/gmail/nossr50/config/LoadProperties.java

@@ -56,8 +56,8 @@ public class LoadProperties {
 			MySQLserverName, MySQLdbName, MySQLdbPass, nWood, nStone, 
 			MySQLserverName, MySQLdbName, MySQLdbPass, nWood, nStone, 
 			nIron, nGold, nDiamond, locale, nString, nLeather;
 			nIron, nGold, nDiamond, locale, nString, nLeather;
 
 
-	public static int mtameWolf, mshearing, mmilkCow, mfishing, xpbar_x, xpbar_y, xpicon_x, xpicon_y,
-			chimaeraId, msandstone, mbase, mpine, mbirch, mspruce, mmelon,
+	public static int treeFellerThreshold, mjungle, mtameWolf, mshearing, mmilkCow, mfishing, xpbar_x, xpbar_y, xpicon_x, xpicon_y,
+			chimaeraId, msandstone, mbase, moak, mbirch, mspruce, mmelon,
 			mcactus, mmushroom, mflower, msugar, mpumpkin, mwheat, mgold,
 			mcactus, mmushroom, mflower, msugar, mpumpkin, mwheat, mgold,
 			mdiamond, miron, mredstone, mlapis, mobsidian, mnetherrack,
 			mdiamond, miron, mredstone, mlapis, mobsidian, mnetherrack,
 			mglowstone, mcoal, mstone, MySQLport, xpGainMultiplier,
 			mglowstone, mcoal, mstone, MySQLport, xpGainMultiplier,
@@ -250,9 +250,10 @@ public class LoadProperties {
 		mvines = readInteger("Experience.Herbalism.Vines", 10);
 		mvines = readInteger("Experience.Herbalism.Vines", 10);
 		herbalismHungerBonus = readBoolean("Skills.Herbalism.Hunger_Bonus", true);
 		herbalismHungerBonus = readBoolean("Skills.Herbalism.Hunger_Bonus", true);
 
 
-		mpine = readInteger("Experience.Woodcutting.Pine", 70);
-		mbirch = readInteger("Experience.Woodcutting.Birch", 80);
-		mspruce = readInteger("Experience.Woodcutting.Spruce", 90);
+		moak = readInteger("Experience.Woodcutting.Oak", 70);
+		mbirch = readInteger("Experience.Woodcutting.Birch", 90);
+		mspruce = readInteger("Experience.Woodcutting.Spruce", 80);
+		mjungle = readInteger("Experience.Woodcutting.Jungle", 100);
 
 
 		mgold = readInteger("Experience.Mining.Gold", 250);
 		mgold = readInteger("Experience.Mining.Gold", 250);
 		mdiamond = readInteger("Experience.Mining.Diamond", 750);
 		mdiamond = readInteger("Experience.Mining.Diamond", 750);
@@ -279,6 +280,7 @@ public class LoadProperties {
 		greenTerraCooldown = readInteger("Abilities.Cooldowns.Green_Terra", 240);
 		greenTerraCooldown = readInteger("Abilities.Cooldowns.Green_Terra", 240);
 		superBreakerCooldown = readInteger("Abilities.Cooldowns.Super_Breaker", 240);
 		superBreakerCooldown = readInteger("Abilities.Cooldowns.Super_Breaker", 240);
 		gigaDrillBreakerCooldown = readInteger("Abilities.Cooldowns.Giga_Drill_Breaker", 240);
 		gigaDrillBreakerCooldown = readInteger("Abilities.Cooldowns.Giga_Drill_Breaker", 240);
+		treeFellerThreshold = readInteger("Abilities.Limits.Tree_Feller_Threshold", 500);
 		treeFellerCooldown = readInteger("Abilities.Cooldowns.Tree_Feller", 240);
 		treeFellerCooldown = readInteger("Abilities.Cooldowns.Tree_Feller", 240);
 		berserkCooldown = readInteger("Abilities.Cooldowns.Berserk", 240);
 		berserkCooldown = readInteger("Abilities.Cooldowns.Berserk", 240);
 		serratedStrikeCooldown = readInteger("Abilities.Cooldowns.Serrated_Strikes", 240);
 		serratedStrikeCooldown = readInteger("Abilities.Cooldowns.Serrated_Strikes", 240);

+ 2 - 0
src/main/java/com/gmail/nossr50/skills/Unarmed.java

@@ -62,6 +62,7 @@ public class Unarmed {
 	    	}
 	    	}
 	    }
 	    }
 	}
 	}
+	
 	public static void unarmedBonus(Player attacker, EntityDamageByEntityEvent event)
 	public static void unarmedBonus(Player attacker, EntityDamageByEntityEvent event)
 	{
 	{
 		PlayerProfile PPa = Users.getProfile(attacker);
 		PlayerProfile PPa = Users.getProfile(attacker);
@@ -75,6 +76,7 @@ public class Unarmed {
         
         
 		event.setDamage(event.getDamage()+bonus);
 		event.setDamage(event.getDamage()+bonus);
 	}
 	}
+	
 	public static void disarmProcCheck(Player attacker, Player defender)
 	public static void disarmProcCheck(Player attacker, Player defender)
 	{
 	{
 		PlayerProfile PP = Users.getProfile(attacker);
 		PlayerProfile PP = Users.getProfile(attacker);

+ 48 - 12
src/main/java/com/gmail/nossr50/skills/WoodCutting.java

@@ -60,7 +60,18 @@ public class WoodCutting
     
     
     private static void removeBlocks(ArrayList<Block> toBeFelled, Player player, PlayerProfile PP, mcMMO plugin)
     private static void removeBlocks(ArrayList<Block> toBeFelled, Player player, PlayerProfile PP, mcMMO plugin)
     {
     {
+        if(toBeFelled.size() > LoadProperties.treeFellerThreshold)
+        {
+            player.sendMessage(mcLocale.getString("Skills.Woodcutting.TreeFellerThreshold"));
+            return;
+        }
         int durabilityLoss = 0, xp = 0;
         int durabilityLoss = 0, xp = 0;
+        //Prepare ItemStacks
+        ItemStack item;
+        ItemStack oak = new ItemStack(Material.LOG, 1, (byte)0, (byte)0);
+        ItemStack spruce = new ItemStack(Material.LOG, 1, (byte)0, (byte)1);
+        ItemStack birch = new ItemStack(Material.LOG, 1, (byte)0, (byte)2);
+        ItemStack jungle = new ItemStack(Material.LOG, 1, (byte)0, (byte)3);
         
         
         for(Block x : toBeFelled)
         for(Block x : toBeFelled)
         {
         {
@@ -72,18 +83,35 @@ public class WoodCutting
             {
             {
                 if(x.getType() == Material.LOG)
                 if(x.getType() == Material.LOG)
                 {
                 {
-                    byte type = x.getData();
-                    ItemStack item = new ItemStack(x.getType(), 1, (byte)0, type);
+                    switch(x.getData())
+                    {
+                    case 0:
+                        item = oak;
+                        break;
+                    case 1:
+                        item = spruce;
+                        break;
+                    case 2:
+                        item = birch;
+                        break;
+                    case 3:
+                        item = jungle;
+                        break;
+                    default:
+                        item = oak;
+                        break;
+                    }
+                    
+                    //ItemStack item = new ItemStack(x.getType(), 1, (byte)0, type);
                         
                         
                     if(!plugin.misc.blockWatchList.contains(x))
                     if(!plugin.misc.blockWatchList.contains(x))
                     {
                     {
                         WoodCutting.woodCuttingProcCheck(player, x);
                         WoodCutting.woodCuttingProcCheck(player, x);
-                        
                             
                             
                         switch(x.getData())
                         switch(x.getData())
                         {
                         {
                             case 0:
                             case 0:
-                                xp += LoadProperties.mpine;
+                                xp += LoadProperties.moak;
                                 break;
                                 break;
                             case 1:
                             case 1:
                                 xp += LoadProperties.mspruce;
                                 xp += LoadProperties.mspruce;
@@ -91,15 +119,17 @@ public class WoodCutting
                             case 2:
                             case 2:
                                 xp += LoadProperties.mbirch;
                                 xp += LoadProperties.mbirch;
                                 break;
                                 break;
+                            case 3:
+                                xp += LoadProperties.mjungle;
+                                break;
                         }
                         }
                     }
                     }
-                        
-                    //Drop the block
-                    x.getWorld().dropItemNaturally(x.getLocation(), item);
-                        
+                    
                     //Remove the block
                     //Remove the block
-                    x.setData((byte) 0);
                     x.setType(Material.AIR);
                     x.setType(Material.AIR);
+                    
+                    //Drop the block
+                    x.getWorld().dropItemNaturally(x.getLocation(), item);
                         
                         
                     //Damage the tool more if the Tree is larger
                     //Damage the tool more if the Tree is larger
                     durabilityLoss++;
                     durabilityLoss++;
@@ -107,7 +137,7 @@ public class WoodCutting
                 } else if(x.getType() == Material.LEAVES) 
                 } else if(x.getType() == Material.LEAVES) 
                 {
                 {
                     Material mat = Material.SAPLING;
                     Material mat = Material.SAPLING;
-                    ItemStack item = new ItemStack(mat, 1, (short)0, (byte)(x.getData()-8));
+                    item = new ItemStack(mat, 1, (short)0, (byte)(x.getData()-8));
                         
                         
                     //90% chance to drop sapling
                     //90% chance to drop sapling
                     m.mcRandomDropItem(x.getLocation(), item, 90);
                     m.mcRandomDropItem(x.getLocation(), item, 90);
@@ -135,6 +165,7 @@ public class WoodCutting
             }
             }
         }
         }
     }
     }
+    
     private static boolean treeFellerCompatible(Block block)
     private static boolean treeFellerCompatible(Block block)
     {
     {
         return block.getType() == Material.LOG || block.getType() == Material.LEAVES || block.getType() == Material.AIR;
         return block.getType() == Material.LOG || block.getType() == Material.LEAVES || block.getType() == Material.AIR;
@@ -143,7 +174,9 @@ public class WoodCutting
     private static void processTreeFelling(Block currentBlock, World world, ArrayList<Block> toBeFelled)
     private static void processTreeFelling(Block currentBlock, World world, ArrayList<Block> toBeFelled)
     {
     {
         int x = currentBlock.getX(), y = currentBlock.getY(), z = currentBlock.getZ();
         int x = currentBlock.getX(), y = currentBlock.getY(), z = currentBlock.getZ();
-        toBeFelled.add(currentBlock);
+        
+        if(currentBlock.getType() == Material.LOG || currentBlock.getType() == Material.LEAVES)
+            toBeFelled.add(currentBlock);
         
         
         //These 2 are to make sure that Tree Feller isn't so aggressive
         //These 2 are to make sure that Tree Feller isn't so aggressive
         boolean isAirOrLeaves = currentBlock.getType() == Material.LEAVES || currentBlock.getType() == Material.AIR;
         boolean isAirOrLeaves = currentBlock.getType() == Material.LEAVES || currentBlock.getType() == Material.AIR;
@@ -244,7 +277,7 @@ public class WoodCutting
     	switch(data)
     	switch(data)
     	{
     	{
     		case 0:
     		case 0:
-    			xp += LoadProperties.mpine;
+    			xp += LoadProperties.moak;
     			break;
     			break;
     		case 1:
     		case 1:
     			xp += LoadProperties.mspruce;
     			xp += LoadProperties.mspruce;
@@ -252,6 +285,9 @@ public class WoodCutting
     		case 2:
     		case 2:
     			xp += LoadProperties.mbirch;
     			xp += LoadProperties.mbirch;
     			break;
     			break;
+    		case 3:
+    		    xp += LoadProperties.mjungle;
+    		    break;
     	}
     	}
     	
     	
     	if(block.getTypeId() == 17)
     	if(block.getTypeId() == 17)

+ 5 - 2
src/main/resources/config.yml

@@ -84,6 +84,8 @@ Abilities:
         Serrated_Strikes: 240
         Serrated_Strikes: 240
         Tree_Feller: 240
         Tree_Feller: 240
         Super_Breaker: 240
         Super_Breaker: 240
+    Limits:
+       Tree_Feller_Threshold: 500
     Tools:
     Tools:
         Durability_Loss_Enabled: true
         Durability_Loss_Enabled: true
         Durability_Loss: 2
         Durability_Loss: 2
@@ -187,9 +189,10 @@ Experience:
     Excavation:
     Excavation:
         Base: 40
         Base: 40
     Woodcutting:
     Woodcutting:
-        Birch: 70
+        Oak: 70
         Spruce: 80
         Spruce: 80
-        Pine: 90
+        Birch: 90
+        Jungle: 100
     Herbalism:
     Herbalism:
         Sugar_Cane: 30
         Sugar_Cane: 30
         Cactus: 30
         Cactus: 30

+ 2 - 1
src/main/resources/locale/locale_de.properties

@@ -399,4 +399,5 @@ m.BlastMining7 = +35% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
-Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!

+ 2 - 1
src/main/resources/locale/locale_en_us.properties

@@ -394,4 +394,5 @@ m.BlastMining7 = +35% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
-Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!

+ 2 - 1
src/main/resources/locale/locale_es_es.properties

@@ -392,4 +392,5 @@ m.BlastMining7 = +35% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
-Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!

+ 2 - 1
src/main/resources/locale/locale_fi.properties

@@ -381,4 +381,5 @@ m.BlastMining7 = +35% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
-Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!

+ 2 - 1
src/main/resources/locale/locale_fr.properties

@@ -392,4 +392,5 @@ m.BlastMining7 = +35% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
-Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!

+ 2 - 1
src/main/resources/locale/locale_nl.properties

@@ -398,4 +398,5 @@ m.BlastMining7 = +35% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
-Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!

+ 2 - 1
src/main/resources/locale/locale_pl.properties

@@ -392,4 +392,5 @@ m.BlastMining7 = +35% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
-Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!

+ 2 - 1
src/main/resources/locale/locale_pt_br.properties

@@ -400,4 +400,5 @@ m.BlastMining7 = +35% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
-Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!

+ 2 - 1
src/main/resources/locale/locale_ru.properties

@@ -384,4 +384,5 @@ m.BlastMining7 = +35% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 m.BlastMining8 = +40% ore yield, no debris, triple drops
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
 Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
-Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
+Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!