Add back the randomly aging (non 0 meta) fires. (#33)

This commit is contained in:
Jason Mitchell authored and GitHub committed 2023-09-10 11:11:57 -07:00
1 parent acbc864d76
commit 7c2c6b7966
1 file changed
+9 -1
@@ -123,7 +123,15 @@ public abstract class BlockFireBase extends BlockFire implements ITTinkererBlock
world.setBlock(xT, yT, zT, targetTransform, 0, 3);
}
}
if (blockMeta >= 15) {
if (blockMeta < 15 && blockMeta > 0) {
// Randomly increase the age of a fire
// 0 meta is considered a source and never increases, for any other meta we have a chance to increase
final int newMeta = Math.min(blockMeta + rand.nextInt(3) / 2, 15);
if (newMeta > blockMeta) {
world.setBlockMetadataWithNotify(x, y, z, newMeta, 4);
}
} else if (blockMeta >= 15) {
// No spreading if we're at max meta
return;
}