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.
This commit is contained in:
nossr50 2012-02-24 01:46:34 -08:00
parent 1f0fcb119d
commit 6708947332
14 changed files with 84 additions and 28 deletions

View File

@ -10,11 +10,13 @@ Key:
Version 1.3.00-dev
+ Added ability to customize drops for Excavation 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 configuration option to control mcMMO reporting damage events
+ Added hunger regain bonuses to Herbalism skill
+ Added Blast Mining subskills to Mining
+ 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
= Fixed Leaf Blower preventing the use of shears to collect leaves
= 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
= Various skill function optimizations
! 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 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

View File

@ -56,8 +56,8 @@ public class LoadProperties {
MySQLserverName, MySQLdbName, MySQLdbPass, nWood, nStone,
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,
mdiamond, miron, mredstone, mlapis, mobsidian, mnetherrack,
mglowstone, mcoal, mstone, MySQLport, xpGainMultiplier,
@ -250,9 +250,10 @@ public class LoadProperties {
mvines = readInteger("Experience.Herbalism.Vines", 10);
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);
mdiamond = readInteger("Experience.Mining.Diamond", 750);
@ -279,6 +280,7 @@ public class LoadProperties {
greenTerraCooldown = readInteger("Abilities.Cooldowns.Green_Terra", 240);
superBreakerCooldown = readInteger("Abilities.Cooldowns.Super_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);
berserkCooldown = readInteger("Abilities.Cooldowns.Berserk", 240);
serratedStrikeCooldown = readInteger("Abilities.Cooldowns.Serrated_Strikes", 240);

View File

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

View File

@ -60,7 +60,18 @@ public class WoodCutting
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;
//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)
{
@ -72,18 +83,35 @@ public class WoodCutting
{
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))
{
WoodCutting.woodCuttingProcCheck(player, x);
switch(x.getData())
{
case 0:
xp += LoadProperties.mpine;
xp += LoadProperties.moak;
break;
case 1:
xp += LoadProperties.mspruce;
@ -91,23 +119,25 @@ public class WoodCutting
case 2:
xp += LoadProperties.mbirch;
break;
case 3:
xp += LoadProperties.mjungle;
break;
}
}
//Remove the block
x.setType(Material.AIR);
//Drop the block
x.getWorld().dropItemNaturally(x.getLocation(), item);
//Remove the block
x.setData((byte) 0);
x.setType(Material.AIR);
//Damage the tool more if the Tree is larger
durabilityLoss++;
} else if(x.getType() == Material.LEAVES)
{
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
m.mcRandomDropItem(x.getLocation(), item, 90);
@ -135,6 +165,7 @@ public class WoodCutting
}
}
}
private static boolean treeFellerCompatible(Block block)
{
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)
{
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
boolean isAirOrLeaves = currentBlock.getType() == Material.LEAVES || currentBlock.getType() == Material.AIR;
@ -244,7 +277,7 @@ public class WoodCutting
switch(data)
{
case 0:
xp += LoadProperties.mpine;
xp += LoadProperties.moak;
break;
case 1:
xp += LoadProperties.mspruce;
@ -252,6 +285,9 @@ public class WoodCutting
case 2:
xp += LoadProperties.mbirch;
break;
case 3:
xp += LoadProperties.mjungle;
break;
}
if(block.getTypeId() == 17)

View File

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

View File

@ -400,3 +400,4 @@ m.BlastMining8 = +40% ore yield, no debris, triple drops
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.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!

View File

@ -395,3 +395,4 @@ m.BlastMining8 = +40% ore yield, no debris, triple drops
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.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!

View File

@ -393,3 +393,4 @@ m.BlastMining8 = +40% ore yield, no debris, triple drops
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.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!

View File

@ -382,3 +382,4 @@ m.BlastMining8 = +40% ore yield, no debris, triple drops
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.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!

View File

@ -393,3 +393,4 @@ m.BlastMining8 = +40% ore yield, no debris, triple drops
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.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!

View File

@ -399,3 +399,4 @@ m.BlastMining8 = +40% ore yield, no debris, triple drops
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.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!

View File

@ -393,3 +393,4 @@ m.BlastMining8 = +40% ore yield, no debris, triple drops
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.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!

View File

@ -401,3 +401,4 @@ m.BlastMining8 = +40% ore yield, no debris, triple drops
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.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!

View File

@ -385,3 +385,4 @@ m.BlastMining8 = +40% ore yield, no debris, triple drops
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.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Skills.Woodcutting.TreeFellerThreshold=[[RED]]That tree is too large!