mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
Shake has an upper limit of 10 damage (will be configurable in the near future), alchemy ranks adjusted
This commit is contained in:
@ -65,18 +65,20 @@ public class BlockListener implements Listener {
|
||||
if(is.getAmount() <= 0)
|
||||
continue;
|
||||
|
||||
//Extra Protection
|
||||
if(event.getBlock().getState() instanceof Container)
|
||||
return;
|
||||
|
||||
if(event.getBlock().getState().getMetadata(mcMMO.doubleDropKey).size() > 0)
|
||||
{
|
||||
//Extra Protection
|
||||
if(event.getBlock().getState() instanceof Container)
|
||||
return;
|
||||
event.getBlock().getState().removeMetadata(mcMMO.doubleDropKey, plugin);
|
||||
event.getBlock().getState().getWorld().dropItemNaturally(event.getBlockState().getLocation(), is);
|
||||
}
|
||||
|
||||
else if(event.getBlock().getState().getMetadata(mcMMO.tripleDropKey).size() > 0)
|
||||
{
|
||||
//Extra Protection
|
||||
if(event.getBlock().getState() instanceof Container)
|
||||
return;
|
||||
event.getBlock().getState().removeMetadata(mcMMO.tripleDropKey, plugin);
|
||||
event.getBlock().getState().getWorld().dropItemNaturally(event.getBlockState().getLocation(), is);
|
||||
event.getBlock().getState().getWorld().dropItemNaturally(event.getBlockState().getLocation(), is);
|
||||
|
@ -420,7 +420,7 @@ public class FishingManager extends SkillManager {
|
||||
}
|
||||
|
||||
Misc.dropItem(target.getLocation(), drop);
|
||||
CombatUtils.dealDamage(target, Math.max(target.getMaxHealth() / 4, 1), EntityDamageEvent.DamageCause.CUSTOM, getPlayer()); // Make it so you can shake a mob no more than 4 times.
|
||||
CombatUtils.dealDamage(target, Math.min(Math.max(target.getMaxHealth() / 4, 1), 10), EntityDamageEvent.DamageCause.CUSTOM, getPlayer()); // Make it so you can shake a mob no more than 4 times.
|
||||
applyXpGain(ExperienceConfig.getInstance().getFishingShakeXP(), XPGainReason.PVE);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user