From d778616b2c7c94e0bab16170be55fa8c72b27ffb Mon Sep 17 00:00:00 2001 From: t00thpick1 Date: Sat, 13 Oct 2018 17:06:54 -0400 Subject: [PATCH] Herbalism was the one that actually needed to remain blockdata. --- src/main/java/com/gmail/nossr50/util/BlockUtils.java | 4 +++- src/main/java/com/gmail/nossr50/util/StringUtils.java | 3 ++- src/main/resources/experience.yml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/util/BlockUtils.java b/src/main/java/com/gmail/nossr50/util/BlockUtils.java index 3579cca10..aadb7f9c8 100644 --- a/src/main/java/com/gmail/nossr50/util/BlockUtils.java +++ b/src/main/java/com/gmail/nossr50/util/BlockUtils.java @@ -172,7 +172,7 @@ public final class BlockUtils { * @return true if the block should affected by Green Terra, false otherwise */ public static boolean affectedByGreenTerra(BlockState blockState) { - if (ExperienceConfig.getInstance().isSkillBlock(SkillType.HERBALISM, blockState.getType())) { + if (ExperienceConfig.getInstance().isSkillBlock(SkillType.HERBALISM, blockState.getBlockData())) { return true; } @@ -362,6 +362,8 @@ public final class BlockUtils { if (data instanceof Ageable) { Ageable ageable = (Ageable) data; + mcMMO.p.debug(ageable.getAge() + "/" + ageable.getMaximumAge()); + System.out.println(ageable.getAge() + "/" + ageable.getMaximumAge()); return ageable.getAge() == ageable.getMaximumAge(); } return true; diff --git a/src/main/java/com/gmail/nossr50/util/StringUtils.java b/src/main/java/com/gmail/nossr50/util/StringUtils.java index 36f1ecddd..0b66049d2 100644 --- a/src/main/java/com/gmail/nossr50/util/StringUtils.java +++ b/src/main/java/com/gmail/nossr50/util/StringUtils.java @@ -6,8 +6,8 @@ import com.gmail.nossr50.datatypes.skills.SecondaryAbility; import org.bukkit.Material; import org.bukkit.TreeSpecies; import org.bukkit.block.data.Ageable; -import org.bukkit.entity.EntityType; import org.bukkit.block.data.BlockData; +import org.bukkit.entity.EntityType; public class StringUtils { @@ -48,6 +48,7 @@ public class StringUtils { public static String getFriendlyConfigBlockDataString(BlockData data) { switch(data.getMaterial()){ + case CHORUS_FLOWER: case COCOA: case WHEAT: case BEETROOTS: diff --git a/src/main/resources/experience.yml b/src/main/resources/experience.yml index 45b8349bd..0f13c74d0 100644 --- a/src/main/resources/experience.yml +++ b/src/main/resources/experience.yml @@ -162,7 +162,7 @@ Experience: Brown_Mushroom: 150 Cactus: 30 Carrots_Ripe: 50 - Chorus_Flower: 25 + Chorus_Flower_Ripe: 25 Chorus_Plant: 1 Cocoa_Ripe: 30 Wheat_Ripe: 50