Code example for DataOutputStream

Methods: write, writeInt, writeShort

0
        this.instrumentType = var1.read();
        this.pitch = var1.read();
    } 
 
    public void writePacketData(DataOutputStream var1) throws IOException {
        var1.writeInt(this.xLocation);
        var1.writeShort(this.yLocation);
        var1.writeInt(this.zLocation);
        var1.write(this.instrumentType);
        var1.write(this.pitch);
    } 
 
    public void processPacket(NetHandler var1) {
        var1.handleNotePlay(this);
    } 
 
    public int getPacketSize() { 
        return 12; 
    } 
}