Add regional cooking and accelerate natural leaf decay

This commit is contained in:
unimatrixgit 2026-12-06 14:18:20 +01:00
commit de1d4a0e1b

View file

@ -479,7 +479,8 @@ public final class DuneTerrain extends JavaPlugin implements Listener {
int lx = x + dx, lz = z + dz, ly = y + dy;
if (lx < 0 || lx >= 16 || lz < 0 || lz >= 16 || ly >= maxY || !data.getType(lx, ly, lz).isAir()) continue;
org.bukkit.block.data.type.Leaves leaves = (org.bukkit.block.data.type.Leaves) Bukkit.createBlockData(Material.OAK_LEAVES);
leaves.setPersistent(true);
leaves.setPersistent(false);
leaves.setDistance(Math.min(7,Math.max(1,Math.abs(dx)+Math.abs(dz)+Math.max(0,dy-height+1))));
data.setBlock(lx, ly, lz, leaves);
}
}