mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	Bamboo is now treated like a cactus/sugar cane
This commit is contained in:
		
							
								
								
									
										2
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								pom.xml
									
									
									
									
									
								
							@@ -2,7 +2,7 @@
 | 
				
			|||||||
    <modelVersion>4.0.0</modelVersion>
 | 
					    <modelVersion>4.0.0</modelVersion>
 | 
				
			||||||
    <groupId>com.gmail.nossr50.mcMMO</groupId>
 | 
					    <groupId>com.gmail.nossr50.mcMMO</groupId>
 | 
				
			||||||
    <artifactId>mcMMO</artifactId>
 | 
					    <artifactId>mcMMO</artifactId>
 | 
				
			||||||
    <version>2.1.224</version>
 | 
					    <version>2.1.225-SNAPSHOT</version>
 | 
				
			||||||
    <name>mcMMO</name>
 | 
					    <name>mcMMO</name>
 | 
				
			||||||
    <url>https://github.com/mcMMO-Dev/mcMMO</url>
 | 
					    <url>https://github.com/mcMMO-Dev/mcMMO</url>
 | 
				
			||||||
    <scm>
 | 
					    <scm>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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)) {
 | 
					                if(isAgeableAndFullyMature(plantData) && !isBizarreAgeable(plantData)) {
 | 
				
			||||||
                    //Add metadata to mark this block for double or triple drops
 | 
					                    //Add metadata to mark this block for double or triple drops
 | 
				
			||||||
                    markForBonusDrops(brokenPlantState);
 | 
					                    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
 | 
					     * @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) {
 | 
					    public boolean isBizarreAgeable(BlockData blockData) {
 | 
				
			||||||
        if(blockData instanceof Ageable) {
 | 
					        if(blockData instanceof Ageable) {
 | 
				
			||||||
            //Catcus and Sugar Canes cannot be trusted
 | 
					            //Catcus and Sugar Canes cannot be trusted
 | 
				
			||||||
            switch(blockData.getMaterial()) {
 | 
					            return switch (blockData.getMaterial()) {
 | 
				
			||||||
                case CACTUS:
 | 
					                case CACTUS, KELP, SUGAR_CANE, BAMBOO -> true;
 | 
				
			||||||
                case KELP:
 | 
					                default -> false;
 | 
				
			||||||
                case SUGAR_CANE:
 | 
					            };
 | 
				
			||||||
                    return true;
 | 
					 | 
				
			||||||
                default:
 | 
					 | 
				
			||||||
                    return false;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return false;
 | 
					        return false;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user