فهرست منبع

Bamboo is now treated like a cactus/sugar cane

nossr50 1 سال پیش
والد
کامیت
12e5a7f054
2فایلهای تغییر یافته به همراه8 افزوده شده و 12 حذف شده
  1. 1 1
      pom.xml
  2. 7 11
      src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java

+ 1 - 1
pom.xml

@@ -2,7 +2,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.gmail.nossr50.mcMMO</groupId>
     <artifactId>mcMMO</artifactId>
-    <version>2.1.224</version>
+    <version>2.1.225-SNAPSHOT</version>
     <name>mcMMO</name>
     <url>https://github.com/mcMMO-Dev/mcMMO</url>
     <scm>

+ 7 - 11
src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java

@@ -363,7 +363,7 @@ public class HerbalismManager extends SkillManager {
                  *
                  */
 
-                //If its a Crop we need to reward XP when its fully grown
+                //If it's a Crop we need to reward XP when its fully grown
                 if(isAgeableAndFullyMature(plantData) && !isBizarreAgeable(plantData)) {
                     //Add metadata to mark this block for double or triple drops
                     markForBonusDrops(brokenPlantState);
@@ -373,21 +373,17 @@ public class HerbalismManager extends SkillManager {
     }
 
     /**
-     * Checks if BlockData is ageable and we can trust that age for Herbalism rewards/XP reasons
+     * Checks if BlockData is bizarre ageable, and we cannot trust that age for Herbalism rewards/XP reasons
      * @param blockData target BlockData
-     * @return returns true if the ageable is trustworthy for Herbalism XP / Rewards
+     * @return returns true if the BlockData is a bizarre ageable for Herbalism XP / Rewards
      */
     public boolean isBizarreAgeable(BlockData blockData) {
         if(blockData instanceof Ageable) {
             //Catcus and Sugar Canes cannot be trusted
-            switch(blockData.getMaterial()) {
-                case CACTUS:
-                case KELP:
-                case SUGAR_CANE:
-                    return true;
-                default:
-                    return false;
-            }
+            return switch (blockData.getMaterial()) {
+                case CACTUS, KELP, SUGAR_CANE, BAMBOO -> true;
+                default -> false;
+            };
         }
 
         return false;