Set metadata on all leaves to prevent them from decaying
This commit is contained in:
parent
ffc019eb8c
commit
91d4f1526e
@ -157,6 +157,15 @@ public class Parse
|
|||||||
block.getRelative(BlockFace.DOWN).setTypeId(0);
|
block.getRelative(BlockFace.DOWN).setTypeId(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (block.getType() == Material.LEAVES || block.getType() == Material.LEAVES_2)
|
||||||
|
{
|
||||||
|
if (block.getData() <= 3)
|
||||||
|
{
|
||||||
|
// https://minecraft.gamepedia.com/Java_Edition_data_values#Leaves
|
||||||
|
// For leaves, you add 4 to get the no decay version
|
||||||
|
block.setData((byte) ((int)block.getData() + 4));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Spawns + Borders
|
//Spawns + Borders
|
||||||
if (block.getTypeId() == 147)
|
if (block.getTypeId() == 147)
|
||||||
|
Loading…
Reference in New Issue
Block a user