remove extraneous prints
This commit is contained in:
parent
245b2483ab
commit
a61b82748c
@ -51,14 +51,12 @@ public class ContainerMemory implements IContainerMemory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void read(byte[] bytes) throws IOException {
|
private void read(byte[] bytes) throws IOException {
|
||||||
System.out.println("READ BYTES " + bytes.length);
|
|
||||||
PacketBuffer in = new PacketBuffer(Unpooled.wrappedBuffer(bytes));
|
PacketBuffer in = new PacketBuffer(Unpooled.wrappedBuffer(bytes));
|
||||||
int chests = in.readInt();
|
int chests = in.readInt();
|
||||||
for (int i = 0; i < chests; i++) {
|
for (int i = 0; i < chests; i++) {
|
||||||
int x = in.readInt();
|
int x = in.readInt();
|
||||||
int y = in.readInt();
|
int y = in.readInt();
|
||||||
int z = in.readInt();
|
int z = in.readInt();
|
||||||
System.out.println("Read x y z " + x + " " + y + " " + z);
|
|
||||||
RememberedInventory rem = new RememberedInventory();
|
RememberedInventory rem = new RememberedInventory();
|
||||||
rem.items.addAll(readItemStacks(in));
|
rem.items.addAll(readItemStacks(in));
|
||||||
rem.size = rem.items.size();
|
rem.size = rem.items.size();
|
||||||
@ -80,7 +78,6 @@ public class ContainerMemory implements IContainerMemory {
|
|||||||
out = new PacketBuffer(out.writeInt(entry.getKey().getZ()));
|
out = new PacketBuffer(out.writeInt(entry.getKey().getZ()));
|
||||||
out = writeItemStacks(entry.getValue().getContents(), out);
|
out = writeItemStacks(entry.getValue().getContents(), out);
|
||||||
}
|
}
|
||||||
System.out.println("CONTAINER BYTES " + out.array().length);
|
|
||||||
Files.write(saveTo, out.array());
|
Files.write(saveTo, out.array());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +109,6 @@ public class ContainerMemory implements IContainerMemory {
|
|||||||
|
|
||||||
public static List<ItemStack> readItemStacks(PacketBuffer in) throws IOException {
|
public static List<ItemStack> readItemStacks(PacketBuffer in) throws IOException {
|
||||||
int count = in.readInt();
|
int count = in.readInt();
|
||||||
System.out.println("Read count " + count);
|
|
||||||
List<ItemStack> result = new ArrayList<>();
|
List<ItemStack> result = new ArrayList<>();
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
result.add(in.readItemStack());
|
result.add(in.readItemStack());
|
||||||
@ -128,10 +124,8 @@ public class ContainerMemory implements IContainerMemory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static PacketBuffer writeItemStacks(List<ItemStack> write, PacketBuffer out) {
|
public static PacketBuffer writeItemStacks(List<ItemStack> write, PacketBuffer out) {
|
||||||
System.out.println("WRITING ITEM STACKS " + write.size() + " " + write);
|
|
||||||
out = new PacketBuffer(out.writeInt(write.size()));
|
out = new PacketBuffer(out.writeInt(write.size()));
|
||||||
for (ItemStack stack : write) {
|
for (ItemStack stack : write) {
|
||||||
System.out.println(out.writableBytes());
|
|
||||||
out = out.writeItemStack(stack);
|
out = out.writeItemStack(stack);
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
|
Loading…
Reference in New Issue
Block a user