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

Method writeIndex

common/buildcraft/lib/nbt/WrittenType.java:46–66  ·  view source on GitHub ↗
(ByteBuf bytes, int index)

Source from the content-addressed store, hash-verified

44 }
45
46 public void writeIndex(ByteBuf bytes, int index) {
47 switch (this) {
48 case BYTE: {
49 bytes.writeByte(index);
50 break;
51 }
52 case SHORT: {
53 bytes.writeShort(index);
54 break;
55 }
56 case MEDIUM: {
57 bytes.writeMedium(index);
58 break;
59 }
60 default:
61 case INT: {
62 bytes.writeInt(index);
63 break;
64 }
65 }
66 }
67
68 public int readIndex(ByteBuf bytes) {
69 switch (this) {

Callers 4

writeCompoundMethod · 0.95
writeListNormalMethod · 0.80
writeListPackedMethod · 0.80

Calls 3

writeByteMethod · 0.45
writeShortMethod · 0.45
writeIntMethod · 0.45

Tested by

no test coverage detected