Presmothering should not occur when smotherMax is set to 0
@@ -270,6 +270,11 @@ public class JoCode {
* @param leavesProperties
*/
protected void smother(SimpleVoxmap leafMap, ILeavesProperties leavesProperties) {
+
+ int smotherMax = leavesProperties.getSmotherLeavesMax();
+
+ if(smotherMax != 0) { //Smothering is disabled if set to 0
+
BlockPos saveCenter = leafMap.getCenter();
leafMap.setCenter(new BlockPos(0, 0, 0));
@@ -293,7 +298,7 @@ public class JoCode {
} else
if((v & 0x0F) != 0) {//Leaves
count++;
- if(count > leavesProperties.getSmotherLeavesMax()){//Smother value
+ if(count > smotherMax){//Smother value
leafMap.setVoxel(new BlockPos(ix, iy, iz), (byte)0);
}
} else
@@ -308,6 +313,8 @@ public class JoCode {
leafMap.setCenter(saveCenter);
}
+ }
+
protected boolean isClearOfNearbyBranches(World world, BlockPos pos, EnumFacing except) {
for(EnumFacing dir: EnumFacing.VALUES) {
