Search in sources :

Example 1 with PacketSelectClimateTargeted

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

the class GuiGreenhouse method sendNetworkUpdate.

public void sendNetworkUpdate() {
    IClimateState climateState = container.getTargetedState();
    if (climateState.isPresent()) {
        BlockPos pos = controller.getCoordinates();
        float temp = temperaturePanel.parseValue();
        float hum = humidityPanel.parseValue();
        setClimate(container, temp, hum);
        NetworkUtil.sendToServer(new PacketSelectClimateTargeted(pos, container.getTargetedState()));
    }
}
Also used : PacketSelectClimateTargeted(forestry.greenhouse.network.packets.PacketSelectClimateTargeted) IClimateState(forestry.api.climate.IClimateState) BlockPos(net.minecraft.util.math.BlockPos)

Aggregations

IClimateState (forestry.api.climate.IClimateState)1 PacketSelectClimateTargeted (forestry.greenhouse.network.packets.PacketSelectClimateTargeted)1 BlockPos (net.minecraft.util.math.BlockPos)1