Code example for DataInputStream

Methods: readByte, readInt, readShort, readUTF

0
    } 
 
    @Override 
    public void readData(DataInputStream data) throws IOException { 
 
        x = data.readInt(); 
        y = data.readInt(); 
        z = data.readInt(); 
        orientation = data.readByte(); 
        state = data.readShort(); 
        owner = data.readUTF(); 
        customName = data.readUTF(); 
    } 
 
    @Override 
    public void execute(INetworkManager manager, Player player) { 
 
        RSMod.proxy.handleTileEntityPacket(x, y, z, ForgeDirection.getOrientation(orientation), state, owner, customName); 
    } 
 
}