mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +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
|
Version 2.0.00-dev
|
||||||
+ Added Ocelots to Taming XP tables.
|
+ 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 Tree Feller to only fell trees if you have enough durability
|
||||||
! Changed invincibility checks in EntityDamage listeners to accommodate for vanilla MC behaviour
|
! Changed invincibility checks in EntityDamage listeners to accommodate for vanilla MC behaviour
|
||||||
! Changed Ignition to add fire ticks rather than replacing them.
|
! Changed Ignition to add fire ticks rather than replacing them.
|
||||||
|
@ -69,6 +69,9 @@ public class WoodCutting
|
|||||||
}
|
}
|
||||||
int durabilityLoss = toBeFelled.size(), xp = 0;
|
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
|
//This is to prevent using wood axes everytime you tree fell
|
||||||
if((player.getItemInHand().getDurability() + durabilityLoss >= player.getItemInHand().getType().getMaxDurability())
|
if((player.getItemInHand().getDurability() + durabilityLoss >= player.getItemInHand().getType().getMaxDurability())
|
||||||
|| player.getItemInHand().getType() == Material.AIR || player.getItemInHand() == null)
|
|| player.getItemInHand().getType() == Material.AIR || player.getItemInHand() == null)
|
||||||
@ -81,9 +84,6 @@ public class WoodCutting
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Damage the tool
|
|
||||||
player.getItemInHand().setDurability((short) (player.getItemInHand().getDurability()+durabilityLoss));
|
|
||||||
|
|
||||||
//Prepare ItemStacks
|
//Prepare ItemStacks
|
||||||
ItemStack item;
|
ItemStack item;
|
||||||
ItemStack oak = new ItemStack(Material.LOG, 1, (byte)0, (byte)0);
|
ItemStack oak = new ItemStack(Material.LOG, 1, (byte)0, (byte)0);
|
||||||
@ -134,7 +134,7 @@ public class WoodCutting
|
|||||||
xp += LoadProperties.mbirch;
|
xp += LoadProperties.mbirch;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
xp += LoadProperties.mjungle;
|
xp += LoadProperties.mjungle/4;
|
||||||
break;
|
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);
|
Skills.XpCheckSkill(SkillType.WOODCUTTING, player);
|
||||||
|
|
||||||
if(LoadProperties.toolsLoseDurabilityFromAbilities)
|
if(LoadProperties.toolsLoseDurabilityFromAbilities)
|
||||||
|
Loading…
Reference in New Issue
Block a user