Search in sources :

Example 1 with PacketGreenhouseData

use of forestry.greenhouse.network.packets.PacketGreenhouseData in project ForestryMC by ForestryMC.

the class GreenhouseProviderServer method create.

public void create() {
    if (ready) {
        GreenhouseState oldState = this.state;
        storage.removeProviderFromChunks();
        storage.clearBlocks(false);
        createBlocks();
        storage.addProviderToChunks();
        if (!world.isRemote) {
            IClimateHousing region = container.getParent();
            BlockPos pos = region.getCoordinates();
            if (pos != null) {
                needReload = oldState != state;
                NetworkUtil.sendNetworkPacket(new PacketGreenhouseData(pos, this), pos, world);
            }
        }
    }
}
Also used : GreenhouseState(forestry.greenhouse.api.climate.GreenhouseState) BlockPos(net.minecraft.util.math.BlockPos) PacketGreenhouseData(forestry.greenhouse.network.packets.PacketGreenhouseData) IClimateHousing(forestry.api.greenhouse.IClimateHousing)

Aggregations

IClimateHousing (forestry.api.greenhouse.IClimateHousing)1 GreenhouseState (forestry.greenhouse.api.climate.GreenhouseState)1 PacketGreenhouseData (forestry.greenhouse.network.packets.PacketGreenhouseData)1 BlockPos (net.minecraft.util.math.BlockPos)1