Fixing Java naming conventions for constants in mcMMO.java also added

some Javadocs
This commit is contained in:
nossr50
2019-05-03 23:39:49 -07:00
parent 8a312da0f5
commit a919c45b09
24 changed files with 146 additions and 121 deletions

View File

@ -188,6 +188,6 @@ public class Herbalism {
* @return true if the block is recently regrown, false otherwise
*/
public static boolean isRecentlyRegrown(BlockState blockState) {
return blockState.hasMetadata(mcMMO.greenThumbDataKey) && !SkillUtils.cooldownExpired(blockState.getMetadata(mcMMO.greenThumbDataKey).get(0).asInt(), 1);
return blockState.hasMetadata(mcMMO.GREEN_THUMB_METAKEY) && !SkillUtils.cooldownExpired(blockState.getMetadata(mcMMO.GREEN_THUMB_METAKEY).get(0).asInt(), 1);
}
}

View File

@ -1,7 +1,6 @@
package com.gmail.nossr50.skills.herbalism;
import com.gmail.nossr50.config.MainConfig;
import com.gmail.nossr50.config.experience.ExperienceConfig;
import com.gmail.nossr50.config.treasure.HerbalismTreasureConfig;
import com.gmail.nossr50.datatypes.experience.XPGainReason;
import com.gmail.nossr50.datatypes.interactions.NotificationType;
@ -341,7 +340,7 @@ public class HerbalismManager extends SkillManager {
private boolean handleBlockState(BlockState blockState, boolean greenTerra) {
int greenThumbStage = getGreenThumbStage();
blockState.setMetadata(mcMMO.greenThumbDataKey, new FixedMetadataValue(mcMMO.p, (int) (System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR)));
blockState.setMetadata(mcMMO.GREEN_THUMB_METAKEY, new FixedMetadataValue(mcMMO.p, (int) (System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR)));
Ageable crops = (Ageable) blockState.getBlockData();
switch (blockState.getType()) {