mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Finalized durability stuff in tree feller. XP nerf only for jungle now.
This commit is contained in:
parent
f6221c1c34
commit
505df87014
@ -9,7 +9,7 @@ Key:
|
||||
|
||||
Version 2.0.00-dev
|
||||
+ Added Ocelots to Taming XP tables.
|
||||
! Changed Tree Feller to hand out 1/3 of normal XP for each LOG block it fells
|
||||
! Changed Tree Feller to hand out 1/4 of normal XP for each JUNGLE LOG block it fells
|
||||
! Changed Tree Feller to only fell trees if you have enough durability
|
||||
! Changed invincibility checks in EntityDamage listeners to accommodate for vanilla MC behaviour
|
||||
! Changed Ignition to add fire ticks rather than replacing them.
|
||||
|
@ -69,6 +69,9 @@ public class WoodCutting
|
||||
}
|
||||
int durabilityLoss = toBeFelled.size(), xp = 0;
|
||||
|
||||
//Damage the tool
|
||||
player.getItemInHand().setDurability((short) (player.getItemInHand().getDurability()+durabilityLoss));
|
||||
|
||||
//This is to prevent using wood axes everytime you tree fell
|
||||
if((player.getItemInHand().getDurability() + durabilityLoss >= player.getItemInHand().getType().getMaxDurability())
|
||||
|| player.getItemInHand().getType() == Material.AIR || player.getItemInHand() == null)
|
||||
@ -81,9 +84,6 @@ public class WoodCutting
|
||||
return;
|
||||
}
|
||||
|
||||
//Damage the tool
|
||||
player.getItemInHand().setDurability((short) (player.getItemInHand().getDurability()+durabilityLoss));
|
||||
|
||||
//Prepare ItemStacks
|
||||
ItemStack item;
|
||||
ItemStack oak = new ItemStack(Material.LOG, 1, (byte)0, (byte)0);
|
||||
@ -134,7 +134,7 @@ public class WoodCutting
|
||||
xp += LoadProperties.mbirch;
|
||||
break;
|
||||
case 3:
|
||||
xp += LoadProperties.mjungle;
|
||||
xp += LoadProperties.mjungle/4;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -161,7 +161,7 @@ public class WoodCutting
|
||||
}
|
||||
}
|
||||
|
||||
PP.addXP(SkillType.WOODCUTTING, xp/3, player); //Tree Feller gives nerf'd XP
|
||||
PP.addXP(SkillType.WOODCUTTING, xp, player); //Tree Feller gives nerf'd XP
|
||||
Skills.XpCheckSkill(SkillType.WOODCUTTING, player);
|
||||
|
||||
if(LoadProperties.toolsLoseDurabilityFromAbilities)
|
||||
|
Loading…
Reference in New Issue
Block a user