Search in sources :

Example 1 with TriggerWrapper

use of buildcraft.transport.gate.TriggerWrapper in project BuildCraft by BuildCraft.

the class ContainerGate method writeMessage.

@Override
public void writeMessage(int id, PacketBufferBC buffer, Side side) {
    super.writeMessage(id, buffer, side);
    if (side == Side.SERVER) {
        if (id == ID_VALID_STATEMENTS) {
            buffer.writeInt(possibleTriggers.size());
            buffer.writeInt(possibleActions.size());
            for (TriggerWrapper wrapper : possibleTriggers) {
                buffer.writeString(wrapper.getUniqueTag());
                buffer.writeEnumValue(wrapper.sourcePart);
            }
            for (ActionWrapper wrapper : possibleActions) {
                buffer.writeString(wrapper.getUniqueTag());
                buffer.writeEnumValue(wrapper.sourcePart);
            }
        }
    }
}
Also used : ActionWrapper(buildcraft.transport.gate.ActionWrapper) TriggerWrapper(buildcraft.transport.gate.TriggerWrapper)

Aggregations

ActionWrapper (buildcraft.transport.gate.ActionWrapper)1 TriggerWrapper (buildcraft.transport.gate.TriggerWrapper)1