Java Code Examples for codechicken.lib.data.MCDataOutput#writeInt()

The following examples show how to use codechicken.lib.data.MCDataOutput#writeInt() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PartFrame.java    From Framez with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void writeDesc(MCDataOutput packet) {

    if (hidden == null)
        hidden = new boolean[6];

    super.writeDesc(packet);

    for (int i = 0; i < 6; i++)
        packet.writeBoolean(hidden[i]);

    for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) {
        Collection<IFrameSideModifier> c = getSideModifiers(d);
        packet.writeInt(c.size());
        for (IFrameModifier m : c)
            packet.writeString(m.getType());
    }
}
 
Example 2
Source File: PartChiselTorch.java    From Chisel-2 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void writeDesc(MCDataOutput packet) {
	super.writeDesc(packet);
	packet.writeInt(idx);
}
 
Example 3
Source File: TubeModule.java    From PneumaticCraft with GNU General Public License v3.0 4 votes vote down vote up
@Optional.Method(modid = ModIds.FMP)
public void writeDesc(MCDataOutput data){
    data.writeInt(dir.ordinal());
}