package me.deftware.client.framework.network;

import io.netty.buffer.Unpooled;
import me.deftware.client.framework.wrappers.item.IItemStack;
import net.minecraft.util.PacketByteBuf;

public class IPacketBuffer {

    public PacketByteBuf buffer;

    public IPacketBuffer() {
        this.buffer = new PacketByteBuf(Unpooled.buffer());
    }

    public IPacketBuffer(PacketByteBuf buffer) {
        this.buffer = buffer;
    }

    public void writeItemStack(IItemStack stack) {
        buffer.writeItemStack(stack.getStack());
    }

    public void writeDouble(double value) {
        buffer.writeDouble(value);
    }

    public void writeFloat(float value) {
        buffer.writeFloat(value);
    }

    public void writeBoolean(boolean value) {
        buffer.writeBoolean(value);
    }

    public void writeString(String value) {
        buffer.writeString(value);
    }

    public double readDouble() {
        return buffer.readDouble();
    }

    public float readFloat() {
        return buffer.readFloat();
    }

    public boolean readBoolean() {
        return buffer.readBoolean();
    }

    public String readString() {
        return buffer.readString();
    }

    public IItemStack readItemStack() {
        return new IItemStack(buffer.readItemStack());
    }

}

@@ -135,16 +135,78 @@
 mStack;%0A
+import me.deftware.client.framework.wrappers.world.IBlockPos;%0A
 import n
@@ -584,32 +584,130 @@
 tack());%0A    %7D%0A%0A
+    public void writeBlockPos(IBlockPos pos) %7B%0A        buffer.writeBlockPos(pos.getPos());%0A    %7D%0A%0A
     public void 
@@ -1440,10 +1440,108 @@
 %0A    %7D%0A%0A
+    public IBlockPos readBlockPos() %7B%0A        return new IBlockPos(buffer.readBlockPos());%0A    %7D%0A%0A
 %7D%0A

Add BlockPos read/write methods to IPacketBuffer