Code example for DataOutput

Methods: writeBytewriteShort

0
        this.myItemStack = readItemStack(datainput);
    } 
 
    public void writePacketData(DataOutput dataoutput)
    { 
        dataoutput.writeByte(this.windowId);
        dataoutput.writeShort(this.itemSlot);
        writeItemStack(this.myItemStack, dataoutput);
    } 
 
    public int getPacketSize() 
    { 
        return 8; 
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE