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

The following examples show how to use codechicken.lib.data.MCDataOutput#writeString() . 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: ConfigTagImpl.java    From CodeChickenLib with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void write(MCDataOutput out) {
    if (isCategory()) {
        out.writeVarInt(children.size());
        for (Entry<String, ConfigTagImpl> entry : children.entrySet()) {
            out.writeString(entry.getKey());
            entry.getValue().write(out);
        }
    } else {
        type.write(out, listType, value);
    }
}
 
Example 3
Source File: ConfigSyncManager.java    From CodeChickenLib with GNU Lesser General Public License v2.1 5 votes vote down vote up
public void write(MCDataOutput out) {
    out.writeVarInt(syncTags.size());
    for (ConfigTag tag : syncTags) {
        out.writeString(tag.getQualifiedName());
        tag.write(out);
    }
}
 
Example 4
Source File: ConfigTag.java    From CodeChickenLib with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void write(MCDataOutput out, TagType listType, Object value) {
    out.writeString((String) value);
}