3
0

Add out-of-box fast leaves decay

This commit is contained in:
Sergey Shatunov
2016-02-04 22:55:51 +07:00
parent 3926aa3878
commit 7b03a5c0d1
2 changed files with 24 additions and 0 deletions

View File

@ -26,3 +26,17 @@
this.dropBlockAsItem(p_150126_1_, p_150126_2_, p_150126_3_, p_150126_4_, p_150126_1_.getBlockMetadata(p_150126_2_, p_150126_3_, p_150126_4_), 0);
p_150126_1_.setBlockToAir(p_150126_2_, p_150126_3_, p_150126_4_);
}
@@ -308,6 +320,13 @@
world.setBlockMetadataWithNotify(x, y, z, i2 | 8, 4);
}
world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z) | 8, 4);
+ // KCauldron start - fast leaves decay
+ if (net.minecraft.server.MinecraftServer.kcauldronConfig.commonFastLeavesDecayEnable.getValue()) {
+ int min = net.minecraft.server.MinecraftServer.kcauldronConfig.commonFastLeavesDecayMinTickTime.getValue();
+ int max = net.minecraft.server.MinecraftServer.kcauldronConfig.commonFastLeavesDecayMaxTickTime.getValue();
+ world.scheduleBlockUpdate(x, y, z, this, min + world.rand.nextInt(max - min));
+ }
+ // KCauldron end
}
@Override