Master Angler reworked

This commit is contained in:
nossr50
2020-11-09 16:46:52 -08:00
parent f4f6abd9d5
commit ba7e235e64
30 changed files with 715 additions and 437 deletions

View File

@@ -80,15 +80,15 @@ public class HerbalismManager extends SkillManager {
}
public boolean canGreenTerraBlock(BlockState blockState) {
return mcMMOPlayer.getAbilityMode(SuperAbilityType.GREEN_TERRA) && BlockUtils.canMakeMossy(blockState);
return mmoPlayer.getAbilityMode(SuperAbilityType.GREEN_TERRA) && BlockUtils.canMakeMossy(blockState);
}
public boolean canActivateAbility() {
return mcMMOPlayer.getToolPreparationMode(ToolType.HOE) && Permissions.greenTerra(getPlayer());
return mmoPlayer.getToolPreparationMode(ToolType.HOE) && Permissions.greenTerra(getPlayer());
}
public boolean isGreenTerraActive() {
return mcMMOPlayer.getAbilityMode(SuperAbilityType.GREEN_TERRA);
return mmoPlayer.getAbilityMode(SuperAbilityType.GREEN_TERRA);
}
/**
@@ -242,7 +242,7 @@ public class HerbalismManager extends SkillManager {
if(delayedChorusBlocks.size() > 0) {
//Check XP for chorus blocks
DelayedHerbalismXPCheckTask delayedHerbalismXPCheckTask = new DelayedHerbalismXPCheckTask(mcMMOPlayer, delayedChorusBlocks);
DelayedHerbalismXPCheckTask delayedHerbalismXPCheckTask = new DelayedHerbalismXPCheckTask(mmoPlayer, delayedChorusBlocks);
//Large delay because the tree takes a while to break
delayedHerbalismXPCheckTask.runTaskLater(mcMMO.p, 20); //Calculate Chorus XP + Bonus Drops 1 tick later
@@ -330,7 +330,7 @@ public class HerbalismManager extends SkillManager {
public void markForBonusDrops(BlockState brokenPlantState) {
//Add metadata to mark this block for double or triple drops
boolean awardTriple = mcMMOPlayer.getAbilityMode(SuperAbilityType.GREEN_TERRA);
boolean awardTriple = mmoPlayer.getAbilityMode(SuperAbilityType.GREEN_TERRA);
BlockUtils.markDropsAsBonus(brokenPlantState, awardTriple);
}
@@ -387,8 +387,8 @@ public class HerbalismManager extends SkillManager {
}
}
if(mcMMOPlayer.isDebugMode()) {
mcMMOPlayer.getPlayer().sendMessage("Plants processed: "+brokenPlants.size());
if(mmoPlayer.isDebugMode()) {
mmoPlayer.getPlayer().sendMessage("Plants processed: "+brokenPlants.size());
}
//Reward XP
@@ -438,9 +438,9 @@ public class HerbalismManager extends SkillManager {
}
}
if(mcMMOPlayer.isDebugMode()) {
mcMMOPlayer.getPlayer().sendMessage("Chorus Plants checked for XP: "+brokenPlants.size());
mcMMOPlayer.getPlayer().sendMessage("Valid Chorus Plant XP Gains: "+blocksGivingXP);
if(mmoPlayer.isDebugMode()) {
mmoPlayer.getPlayer().sendMessage("Chorus Plants checked for XP: "+brokenPlants.size());
mmoPlayer.getPlayer().sendMessage("Valid Chorus Plant XP Gains: "+blocksGivingXP);
}
//Reward XP