New skill 'Knock On Wood', changes to axe readying messages

This commit is contained in:
nossr50
2020-11-10 15:17:52 -08:00
parent 8f6819edc5
commit b31e1e533b
14 changed files with 168 additions and 38 deletions

View File

@@ -11,6 +11,7 @@ import com.gmail.nossr50.skills.salvage.Salvage;
import com.gmail.nossr50.util.random.RandomChanceSkill;
import com.gmail.nossr50.util.random.RandomChanceUtil;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockState;
import org.bukkit.block.data.Ageable;
import org.bukkit.block.data.BlockData;
@@ -179,6 +180,10 @@ public final class BlockUtils {
return mcMMO.getMaterialMapStore().isTreeFellerDestructible(blockState.getType());
}
public static boolean isNonWoodPartOfTree(Material material) {
return mcMMO.getMaterialMapStore().isTreeFellerDestructible(material);
}
/**
* Determine if a given block should be affected by Flux Mining
*
@@ -274,4 +279,8 @@ public final class BlockUtils {
}
return true;
}
public static boolean isPartOfTree(Block rayCast) {
return hasWoodcuttingXP(rayCast.getState()) || isNonWoodPartOfTree(rayCast.getType());
}
}