2.1.18 - It turns out Kelp is actually made up of 2 blocks mixed together

This commit is contained in:
nossr50
2019-03-16 20:26:26 -07:00
parent 8994594ed4
commit 2f0a58b968
5 changed files with 64 additions and 4 deletions

View File

@@ -126,7 +126,8 @@ public class HerbalismManager extends SkillManager {
public void herbalismBlockCheck(BlockState blockState) {
Player player = getPlayer();
Material material = blockState.getType();
boolean oneBlockPlant = !(material == Material.CACTUS || material == Material.CHORUS_PLANT || material == Material.SUGAR_CANE || material == Material.KELP_PLANT);
boolean oneBlockPlant = !(material == Material.CACTUS || material == Material.CHORUS_PLANT
|| material == Material.SUGAR_CANE || material == Material.KELP_PLANT || material == Material.KELP);
// Prevents placing and immediately breaking blocks for exp
if (oneBlockPlant && mcMMO.getPlaceStore().isTrue(blockState)) {
@@ -158,7 +159,13 @@ public class HerbalismManager extends SkillManager {
}
if (!oneBlockPlant) {
amount = Herbalism.calculateMultiBlockPlantDrops(blockState);
//Kelp is actually two blocks mixed together
if(material == Material.KELP_PLANT || material == Material.KELP) {
amount = Herbalism.calculateKelpPlantDrops(blockState);
} else {
amount = Herbalism.calculateMultiBlockPlantDrops(blockState);
}
xp *= amount;
}