mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 03:34:43 +02:00
Protect our managers.
This commit is contained in:
@ -63,7 +63,7 @@ public class Herbalism {
|
||||
protected static int calculateCatciAndSugarDrops(BlockState blockState) {
|
||||
Block block = blockState.getBlock();
|
||||
Material blockType = blockState.getType();
|
||||
int dropAmount = mcMMO.placeStore.isTrue(block) ? 0 : 1;
|
||||
int dropAmount = mcMMO.getPlaceStore().isTrue(block) ? 0 : 1;
|
||||
|
||||
// Handle the two blocks above it - cacti & sugar cane can only grow 3 high naturally
|
||||
for (int y = 1; y < 3; y++) {
|
||||
@ -73,8 +73,8 @@ public class Herbalism {
|
||||
break;
|
||||
}
|
||||
|
||||
if (mcMMO.placeStore.isTrue(relativeBlock)) {
|
||||
mcMMO.placeStore.setFalse(relativeBlock);
|
||||
if (mcMMO.getPlaceStore().isTrue(relativeBlock)) {
|
||||
mcMMO.getPlaceStore().setFalse(relativeBlock);
|
||||
}
|
||||
else {
|
||||
dropAmount++;
|
||||
|
@ -118,7 +118,7 @@ public class HerbalismManager extends SkillManager {
|
||||
Material material = blockState.getType();
|
||||
boolean oneBlockPlant = !(material == Material.CACTUS || material == Material.SUGAR_CANE_BLOCK);
|
||||
|
||||
if (oneBlockPlant && mcMMO.placeStore.isTrue(blockState)) {
|
||||
if (oneBlockPlant && mcMMO.getPlaceStore().isTrue(blockState)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -206,8 +206,8 @@ public class HerbalismManager extends SkillManager {
|
||||
|
||||
case RED_ROSE:
|
||||
case YELLOW_FLOWER:
|
||||
if (mcMMO.placeStore.isTrue(blockState)) {
|
||||
mcMMO.placeStore.setFalse(blockState);
|
||||
if (mcMMO.getPlaceStore().isTrue(blockState)) {
|
||||
mcMMO.getPlaceStore().setFalse(blockState);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user