Update mcMMO for Minecraft 1.7.2

This commit is contained in:
GJ
2013-12-02 12:08:12 -05:00
committed by TfT_02
parent 80571fbe8f
commit 60ddd799de
10 changed files with 198 additions and 56 deletions

View File

@ -112,7 +112,9 @@ public final class BlockUtils {
switch (blockState.getType()) {
case BROWN_MUSHROOM:
case CACTUS:
case DOUBLE_PLANT:
case MELON_BLOCK:
case LONG_GRASS:
case PUMPKIN:
case RED_MUSHROOM:
case RED_ROSE:
@ -150,10 +152,13 @@ public final class BlockUtils {
switch (blockState.getType()) {
case ENDER_STONE:
case GLOWSTONE:
case HARD_CLAY:
case MOSSY_COBBLESTONE:
case NETHERRACK:
case OBSIDIAN:
case PACKED_ICE:
case SANDSTONE:
case STAINED_CLAY:
case STONE:
return true;
@ -195,6 +200,7 @@ public final class BlockUtils {
public static boolean isLog(BlockState blockState) {
switch (blockState.getType()) {
case LOG:
case LOG_2:
case HUGE_MUSHROOM_1:
case HUGE_MUSHROOM_2:
return true;
@ -213,6 +219,7 @@ public final class BlockUtils {
public static boolean isLeaves(BlockState blockState) {
switch (blockState.getType()) {
case LEAVES:
case LEAVES_2:
return true;
default:
@ -275,7 +282,7 @@ public final class BlockUtils {
* 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
* @return true if the block can be made into Mycelium, false otherwise
*/
public static boolean canMakeShroomy(BlockState blockState) {
switch (blockState.getType()) {

View File

@ -1,12 +1,14 @@
package com.gmail.nossr50.util;
import org.bukkit.ChatColor;
import org.bukkit.CoalType;
import org.bukkit.DyeColor;
import org.bukkit.Material;
import org.bukkit.inventory.FurnaceRecipe;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.Recipe;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.material.Coal;
import org.bukkit.material.Dye;
import com.gmail.nossr50.mcMMO;
@ -586,6 +588,8 @@ public final class ItemUtils {
case PUMPKIN_SEEDS:
case WATER_LILY:
case VINE:
case LONG_GRASS:
case DOUBLE_PLANT:
return true;
case INK_SACK:
@ -614,7 +618,6 @@ public final class ItemUtils {
case PORK:
case GRILLED_PORK:
case WOOL:
case RED_ROSE: // Not sure we should include this, as it will also trigger from herbalism
case IRON_INGOT:
case SNOW_BALL:
case BLAZE_ROD:
@ -627,12 +630,17 @@ public final class ItemUtils {
case ARROW:
case SLIME_BALL:
case NETHER_STAR:
case COAL: // Not sure we should include this, as it will also trigger when mining
case ROTTEN_FLESH:
case GOLD_NUGGET:
case EGG:
return true;
case COAL: // Not sure we should include this, as it will also trigger when mining
return (((Coal) item.getData()).getType() == CoalType.COAL);
case RED_ROSE: // Not sure we should include this, as it will also trigger from herbalism
return (item.getData().getData() == 0x0);
default:
return false;
}
@ -647,7 +655,9 @@ public final class ItemUtils {
public static boolean isWoodcuttingDrop(ItemStack item) {
switch (item.getType()) {
case LOG:
case LOG_2:
case LEAVES:
case LEAVES_2:
case SAPLING:
case APPLE:
return true;

View File

@ -1,6 +1,7 @@
package com.gmail.nossr50.util;
import org.bukkit.Material;
import org.bukkit.TreeSpecies;
import org.bukkit.entity.EntityType;
import com.gmail.nossr50.datatypes.party.PartyFeature;
@ -30,6 +31,10 @@ public class StringUtils {
return createPrettyEnumString(ability.toString());
}
public static String getPrettyTreeSpeciesString(TreeSpecies species) {
return createPrettyEnumString(species.toString());
}
public static String getPrettySecondaryAbilityString(SecondaryAbility secondaryAbility) {
switch (secondaryAbility) {
case HERBALISM_DOUBLE_DROPS: