Search in sources :

Example 1 with PropertyHolder

use of network.rs485.logisticspipes.property.PropertyHolder in project LogisticsPipes by RS485.

the class PipePropertiesUpdate method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    LogisticsTileGenericPipe tile = this.getPipe(player.getEntityWorld(), LTGPCompletionCheck.PIPE);
    if (!(tile.pipe instanceof PropertyHolder)) {
        return;
    }
    // sync updated properties
    tile.pipe.readFromNBT(tag);
    MainProxy.runOnServer(player.world, () -> () -> {
        // resync client; always
        MainProxy.sendPacketToPlayer(fromPropertyHolder((PropertyHolder) tile.pipe).setPacketPos(this), player);
    });
}
Also used : PropertyHolder(network.rs485.logisticspipes.property.PropertyHolder) LogisticsTileGenericPipe(logisticspipes.pipes.basic.LogisticsTileGenericPipe)

Aggregations

LogisticsTileGenericPipe (logisticspipes.pipes.basic.LogisticsTileGenericPipe)1 PropertyHolder (network.rs485.logisticspipes.property.PropertyHolder)1