Add regional cooking and accelerate natural leaf decay
This commit is contained in:
parent
cdaa6a85a2
commit
de1d4a0e1b
1 changed files with 6615 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue

Staff