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; 
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java