Some polishing for Rubber Tree feature

This commit is contained in:
drcrazy 2019-03-14 12:58:23 +03:00
parent 889e576683
commit 5c6b268dcb

View file

@ -75,19 +75,19 @@ public class RubberTreeFeature extends AbstractTreeFeature<NoFeatureConfig> {
radius = 2;
}
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();
for (xOffset = baseX - radius; xOffset <= baseX + radius; ++xOffset) {
for (zOffset = baseZ - radius; zOffset <= baseZ + radius; ++zOffset) {
//TODO: Change to mutable
BlockPos pos = new BlockPos(xOffset, yOffset, zOffset);
Block block = worldIn.getBlockState(pos).getBlock();
if (block != null && !this.canGrowInto(worldIn, pos)) {
if (!this.canGrowInto(worldIn, blockpos$mutableblockpos.setPos(xOffset, yOffset, xOffset))) {
return false;
}
}
}
}
// Ok, we are cleared for take off!
// TODO: Grow tree after log blockstate fix
return false;
}