MCPcopy Create free account
hub / github.com/BuildCraft/BuildCraft / toBytes

Method toBytes

common/buildcraft/lib/net/MessageCommand.java:89–100  ·  view source on GitHub ↗
(ByteBuf buf)

Source from the content-addressed store, hash-verified

87 }
88
89 @Override
90 public void toBytes(ByteBuf buf) {
91 payload = new PacketBuffer(Unpooled.buffer());
92 target.writePositionData(payload);
93 writer.write(payload);
94
95 PacketBuffer buffer = new PacketBuffer(buf);
96 buffer.writeString(name);
97 buffer.writeByte(target.getType().ordinal());
98 buffer.writeShort(payload.readableBytes());
99 buffer.writeBytes(payload, payload.readableBytes());
100 }
101
102 @Deprecated
103 public static enum Handler implements IMessageHandler<MessageCommand, MessageCommand> {

Callers

nothing calls this directly

Calls 6

writePositionDataMethod · 0.65
writeMethod · 0.65
getTypeMethod · 0.65
writeByteMethod · 0.45
writeShortMethod · 0.45
writeBytesMethod · 0.45

Tested by

no test coverage detected