Added "Shroom Thumb" ability to Herbalism. Closes #724

This commit is contained in:
GJ
2013-02-25 09:58:25 -05:00
parent 3bd9a30055
commit 2373ca82ba
10 changed files with 124 additions and 2 deletions

View File

@ -345,4 +345,21 @@ public final class BlockChecks {
return false;
}
}
/**
* Determine if a given block can be made into Mycelium
*
* @param blockState The {@link BlockState} of the block to check
* @return true if the block can be made in Mycelium, false otherwise
*/
public static boolean canMakeShroomy(BlockState blockState) {
switch (blockState.getType()) {
case DIRT:
case GRASS:
return true;
default:
return false;
}
}
}

View File

@ -146,6 +146,7 @@ public final class Permissions {
public static boolean greenThumbBlock(Permissible permissible, Material material) { return permissible.hasPermission("mcmmo.ability.herbalism.greenthumb.blocks." + material.toString().replace("_", "").toLowerCase()); }
public static boolean greenThumbPlant(Permissible permissible, Material material) { return permissible.hasPermission("mcmmo.ability.herbalism.greenthumb.plants." + material.toString().replace("_", "").toLowerCase()); }
public static boolean hylianLuck(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.herbalism.hylianluck"); }
public static boolean shroomThumb(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.herbalism.shroomthumb"); }
/* MINING */
public static boolean biggerBombs(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.mining.blastmining.biggerbombs"); }