use of forestry.api.greenhouse.IClimateHousing in project ForestryMC by ForestryMC.
the class GreenhouseProviderClient method markBlockForRenderUpdate.
public void markBlockForRenderUpdate() {
IClimateHousing housing = container.getParent();
if (housing instanceof IGreenhouseController) {
IGreenhouseController controller = (IGreenhouseController) housing;
if (!controller.isAssembled()) {
return;
}
BlockPos position = controller.getCenterCoordinates();
Position2D minEdge = limits.getMinimumCoordinates();
Position2D maxEdge = limits.getMaximumCoordinates();
BlockPos minPos = new BlockPos(minEdge.getX(), -limits.getDepth(), minEdge.getZ());
BlockPos maxPos = new BlockPos(maxEdge.getX() + 1, limits.getHeight(), maxEdge.getZ() + 1);
minPos = minPos.add(position);
maxPos = maxPos.add(position);
world.markBlockRangeForRenderUpdate(minPos, maxPos);
}
}
Aggregations