Log bamboo growth (new world logging option)

Fixes #769
This commit is contained in:
Brokkonaut
2020-01-24 04:52:13 +01:00
parent 8b34e39797
commit b9513df20e
2 changed files with 13 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ public enum Logging {
MYCELIUMSPREAD,
VINEGROWTH,
MUSHROOMSPREAD,
BAMBOOGROWTH,
WITHER(true),
WITHER_SKULL(true),
BONEMEALSTRUCTUREGROW,

View File

@@ -51,6 +51,18 @@ public class BlockSpreadLogging extends LoggingListener {
}
name = "MushroomSpread";
break;
case BAMBOO:
case BAMBOO_SAPLING: {
if (!isLogging(world, Logging.BAMBOOGROWTH)) {
return;
}
name = "BambooGrowth";
if (type == Material.BAMBOO_SAPLING) {
// bamboo sapling gets replaced by bamboo
consumer.queueBlockReplace(new Actor(name), event.getSource().getState(), Material.BAMBOO.createBlockData());
}
break;
}
default:
return;
}